File tree 1 file changed +8
-0
lines changed
compiler/rustc_middle/src/mir
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -2246,8 +2246,12 @@ pub enum BinOp {
2246
2246
/// The `*` operator (multiplication)
2247
2247
Mul ,
2248
2248
/// The `/` operator (division)
2249
+ ///
2250
+ /// Division by zero is UB.
2249
2251
Div ,
2250
2252
/// The `%` operator (modulus)
2253
+ ///
2254
+ /// Using zero as the modulus (second operand) is UB.
2251
2255
Rem ,
2252
2256
/// The `^` operator (bitwise xor)
2253
2257
BitXor ,
@@ -2256,8 +2260,12 @@ pub enum BinOp {
2256
2260
/// The `|` operator (bitwise or)
2257
2261
BitOr ,
2258
2262
/// The `<<` operator (shift left)
2263
+ ///
2264
+ /// The offset is truncated to the size of the first operand before shifting.
2259
2265
Shl ,
2260
2266
/// The `>>` operator (shift right)
2267
+ ///
2268
+ /// The offset is truncated to the size of the first operand before shifting.
2261
2269
Shr ,
2262
2270
/// The `==` operator (equality)
2263
2271
Eq ,
You can’t perform that action at this time.
0 commit comments