Rollup merge of #126469 - RalfJung:mir-shifts, r=scottmcm
MIR Shl/Shr: the offset can be computed with rem_euclid r? ````@scottmcm````
This commit is contained in:
commit
f24509aa23
2 changed files with 11 additions and 14 deletions
|
@ -1490,7 +1490,8 @@ pub enum BinOp {
|
|||
BitOr,
|
||||
/// The `<<` operator (shift left)
|
||||
///
|
||||
/// The offset is (uniquely) determined as follows:
|
||||
/// The offset is given by `RHS.rem_euclid(LHS::BITS)`.
|
||||
/// In other words, it is (uniquely) determined as follows:
|
||||
/// - it is "equal modulo LHS::BITS" to the RHS
|
||||
/// - it is in the range `0..LHS::BITS`
|
||||
Shl,
|
||||
|
@ -1498,7 +1499,8 @@ pub enum BinOp {
|
|||
ShlUnchecked,
|
||||
/// The `>>` operator (shift right)
|
||||
///
|
||||
/// The offset is (uniquely) determined as follows:
|
||||
/// The offset is given by `RHS.rem_euclid(LHS::BITS)`.
|
||||
/// In other words, it is (uniquely) determined as follows:
|
||||
/// - it is "equal modulo LHS::BITS" to the RHS
|
||||
/// - it is in the range `0..LHS::BITS`
|
||||
///
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue