@@ -1480,13 +1480,17 @@ 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 is (uniquely) determined as follows: |
| 1484 | + /// - it is "equal modulo LHS::BITS" to the RHS |
| 1485 | + /// - it is in the range `0..LHS::BITS` |
1484 | 1486 | Shl, |
1485 | 1487 | /// Like `Shl`, but is UB if the RHS >= LHS::BITS or RHS < 0 |
1486 | 1488 | ShlUnchecked, |
1487 | 1489 | /// The `>>` operator (shift right) |
1488 | 1490 | /// |
1489 | | - /// The offset is truncated to the size of the first operand and made unsigned before shifting. |
| 1491 | + /// The offset is (uniquely) determined as follows: |
| 1492 | + /// - it is "equal modulo LHS::BITS" to the RHS |
| 1493 | + /// - it is in the range `0..LHS::BITS` |
1490 | 1494 | /// |
1491 | 1495 | /// This is an arithmetic shift if the LHS is signed |
1492 | 1496 | /// and a logical shift if the LHS is unsigned. |
|