about summary refs log tree commit diff
path: root/src/test/ui/consts/const-eval/const-eval-query-stack.rs
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2022-09-21 13:05:20 +0200
committerRalf Jung <post@ralfj.de>2022-10-07 18:08:49 +0200
commitfd59d44f5880fea109fe68e31fab2486cd686fc6 (patch)
tree3eef90caf77fefc09fc993e511f9a9b8f5470cb2 /src/test/ui/consts/const-eval/const-eval-query-stack.rs
parent58546803885164d488185fb9cb9fb04fcbe64e30 (diff)
downloadrust-fd59d44f5880fea109fe68e31fab2486cd686fc6.tar.gz
rust-fd59d44f5880fea109fe68e31fab2486cd686fc6.zip
make const_err a hard error
Diffstat (limited to 'src/test/ui/consts/const-eval/const-eval-query-stack.rs')
-rw-r--r--src/test/ui/consts/const-eval/const-eval-query-stack.rs10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/test/ui/consts/const-eval/const-eval-query-stack.rs b/src/test/ui/consts/const-eval/const-eval-query-stack.rs
index c9460498951..8f8a8cee3a0 100644
--- a/src/test/ui/consts/const-eval/const-eval-query-stack.rs
+++ b/src/test/ui/consts/const-eval/const-eval-query-stack.rs
@@ -1,5 +1,4 @@
-// compile-flags: -Ztreat-err-as-bug=2
-// build-fail
+// compile-flags: -Ztreat-err-as-bug=1
 // failure-status: 101
 // rustc-env:RUST_BACKTRACE=1
 // normalize-stderr-test "\nerror: internal compiler error.*\n\n" -> ""
@@ -15,14 +14,9 @@
 
 #![allow(unconditional_panic)]
 
-#[warn(const_err)]
-const X: i32 = 1 / 0; //~WARN any use of this value will cause an error
-//~| WARN this was previously accepted by the compiler but is being phased out
+const X: i32 = 1 / 0; //~ERROR constant
 
 fn main() {
     let x: &'static i32 = &X;
-    //~^ ERROR evaluation of constant value failed
-    //~| ERROR erroneous constant used
-    //~| WARNING this was previously accepted by the compiler
     println!("x={}", x);
 }