From 520463a631b491bf06fd3f8f11a90af9edddf499 Mon Sep 17 00:00:00 2001 From: Deadbeef Date: Tue, 15 Feb 2022 20:49:49 +1100 Subject: [PATCH] Remove outdated UB claims in compiler In other words, makes the language 100 times safer :rocket: :rocket: --- compiler/rustc_middle/src/mir/mod.rs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/compiler/rustc_middle/src/mir/mod.rs b/compiler/rustc_middle/src/mir/mod.rs index 0688d7d2569f5..057dfe161faf2 100644 --- a/compiler/rustc_middle/src/mir/mod.rs +++ b/compiler/rustc_middle/src/mir/mod.rs @@ -2269,12 +2269,8 @@ pub enum BinOp { /// The `*` operator (multiplication) Mul, /// The `/` operator (division) - /// - /// Division by zero is UB. Div, /// The `%` operator (modulus) - /// - /// Using zero as the modulus (second operand) is UB. Rem, /// The `^` operator (bitwise xor) BitXor,