about summary refs log tree commit diff
path: root/compiler/rustc_middle/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-11-20 11:24:28 +0000
committerbors <bors@rust-lang.org>2023-11-20 11:24:28 +0000
commit46ecc10c6951a2a0e52d93fe5d3acae9743e3ab9 (patch)
tree3989c4c98f33267bb093b53e3f47867a3a65f43d /compiler/rustc_middle/src
parent79e961fa728e543e9b4f8b44f6bc2550ea867d4d (diff)
parent791ed333fb978d2b2822d4e32f33bed85277b7e2 (diff)
downloadrust-46ecc10c6951a2a0e52d93fe5d3acae9743e3ab9.tar.gz
rust-46ecc10c6951a2a0e52d93fe5d3acae9743e3ab9.zip
Auto merge of #118082 - compiler-errors:rollup-ejsc8yd, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #117828 (Avoid iterating over hashmaps in astconv)
 - #117832 (interpret: simplify handling of shifts by no longer trying to handle signed and unsigned shift amounts in the same branch)
 - #117891 (Recover `dyn` and `impl` after `for<...>`)
 - #117957 (if available use a Child's pidfd for kill/wait)
 - #117988 (Handle attempts to have multiple `cfg`d tail expressions)
 - #117994 (Ignore but do not assume region obligations from unifying headers in negative coherence)
 - #118000 (Make regionck care about placeholders in outlives components)
 - #118068 (subtree update cg_gcc 2023/11/17)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_middle/src')
-rw-r--r--compiler/rustc_middle/src/mir/syntax.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_middle/src/mir/syntax.rs b/compiler/rustc_middle/src/mir/syntax.rs
index 7b0f27f9b34..8cf9e55f0b6 100644
--- a/compiler/rustc_middle/src/mir/syntax.rs
+++ b/compiler/rustc_middle/src/mir/syntax.rs
@@ -1404,18 +1404,18 @@ pub enum BinOp {
     BitOr,
     /// The `<<` operator (shift left)
     ///
-    /// The offset is truncated to the size of the first operand before shifting.
+    /// The offset is truncated to the size of the first operand and made unsigned before shifting.
     Shl,
-    /// Like `Shl`, but is UB if the RHS >= LHS::BITS
+    /// Like `Shl`, but is UB if the RHS >= LHS::BITS or RHS < 0
     ShlUnchecked,
     /// The `>>` operator (shift right)
     ///
-    /// The offset is truncated to the size of the first operand before shifting.
+    /// The offset is truncated to the size of the first operand and made unsigned before shifting.
     ///
     /// This is an arithmetic shift if the LHS is signed
     /// and a logical shift if the LHS is unsigned.
     Shr,
-    /// Like `Shl`, but is UB if the RHS >= LHS::BITS
+    /// Like `Shl`, but is UB if the RHS >= LHS::BITS or RHS < 0
     ShrUnchecked,
     /// The `==` operator (equality)
     Eq,