Skip to content

Commit

Permalink
Auto merge of #118082 - compiler-errors:rollup-ejsc8yd, r=matthiaskrgr
Browse files Browse the repository at this point in the history
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
  • Loading branch information
bors committed Nov 20, 2023
2 parents 9a89cc0 + 3473f79 commit 8c05cbf
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/fail/intrinsics/unchecked_shl2.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#![feature(core_intrinsics)]
use std::intrinsics;

fn main() {
unsafe {
let _n = intrinsics::unchecked_shl(1i8, -1);
//~^ ERROR: overflowing shift by -1 in `unchecked_shl`
}
}
15 changes: 15 additions & 0 deletions tests/fail/intrinsics/unchecked_shl2.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
error: Undefined Behavior: overflowing shift by -1 in `unchecked_shl`
--> $DIR/unchecked_shl2.rs:LL:CC
|
LL | let _n = intrinsics::unchecked_shl(1i8, -1);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by -1 in `unchecked_shl`
|
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: BACKTRACE:
= note: inside `main` at $DIR/unchecked_shl2.rs:LL:CC

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

error: aborting due to previous error

0 comments on commit 8c05cbf

Please sign in to comment.