add test
This commit is contained in:
parent
a524a9af91
commit
0ad3b1c9bf
2 changed files with 14 additions and 0 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