File tree 1 file changed +4
-2
lines changed
compiler/rustc_middle/src/mir
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1480,13 +1480,15 @@ pub enum BinOp {
1480
1480
BitOr ,
1481
1481
/// The `<<` operator (shift left)
1482
1482
///
1483
- /// The offset is truncated to the size of the first operand and made unsigned before shifting.
1483
+ /// The offset (RHS) is re-interpreted as an unsigned value of the same size and then truncated
1484
+ /// to the size of the first operand before shifting.
1484
1485
Shl ,
1485
1486
/// Like `Shl`, but is UB if the RHS >= LHS::BITS or RHS < 0
1486
1487
ShlUnchecked ,
1487
1488
/// The `>>` operator (shift right)
1488
1489
///
1489
- /// The offset is truncated to the size of the first operand and made unsigned before shifting.
1490
+ /// The offset (RHS) is re-interpreted as an unsigned value of the same size and then truncated
1491
+ /// to the size of the first operand before shifting.
1490
1492
///
1491
1493
/// This is an arithmetic shift if the LHS is signed
1492
1494
/// and a logical shift if the LHS is unsigned.
You can’t perform that action at this time.
0 commit comments