We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6655109 commit 7fa87f2Copy full SHA for 7fa87f2
compiler/rustc_middle/src/mir/mod.rs
@@ -2270,11 +2270,13 @@ pub enum BinOp {
2270
Mul,
2271
/// The `/` operator (division)
2272
///
2273
- /// Division by zero is UB.
+ /// Division by zero is UB, because the compiler should have inserted checks
2274
+ /// prior to this.
2275
Div,
2276
/// The `%` operator (modulus)
2277
- /// Using zero as the modulus (second operand) is UB.
2278
+ /// Using zero as the modulus (second operand) is UB, because the compiler
2279
+ /// should have inserted checks prior to this.
2280
Rem,
2281
/// The `^` operator (bitwise xor)
2282
BitXor,
0 commit comments