Auto merge of #70771 - RalfJung:ctfe-loop, r=oli-obk
Miri terminator handling: only do progress sanity check for 'Call' terminator This will still catch mistakes in bad intrinsic/foreign-item shims, which is the main source of errors here. Fixes https://github.com/rust-lang/rust/issues/70723 r? @oli-obk
This commit is contained in:
commit
bd18bc9a4c
8 changed files with 63 additions and 31 deletions
5
src/test/ui/consts/const-eval/issue-70723.rs
Normal file
5
src/test/ui/consts/const-eval/issue-70723.rs
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
#![feature(const_loop)]
|
||||
|
||||
static _X: () = loop {}; //~ ERROR could not evaluate static initializer
|
||||
|
||||
fn main() {}
|
||||
9
src/test/ui/consts/const-eval/issue-70723.stderr
Normal file
9
src/test/ui/consts/const-eval/issue-70723.stderr
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
error[E0080]: could not evaluate static initializer
|
||||
--> $DIR/issue-70723.rs:3:17
|
||||
|
|
||||
LL | static _X: () = loop {};
|
||||
| ^^^^^^^ exceeded interpreter step limit (see `#[const_eval_limit]`)
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0080`.
|
||||
Loading…
Add table
Add a link
Reference in a new issue