summary refs log tree commit diff
path: root/src/test/ui/consts/const-err.rs
diff options
context:
space:
mode:
authorOliver Schneider <github35764891676564198441@oli-obk.de>2018-08-26 15:19:34 +0200
committerOliver Scherer <github35764891676564198441@oli-obk.de>2018-10-25 16:46:19 +0200
commit7fdf06cdde49c8cd87e34e85a95c1fe90ebdb0c3 (patch)
tree659449f68fb00da4052dd67ba6725b17d6aaf26d /src/test/ui/consts/const-err.rs
parent3476ac0bee4042653ecb00207ceb9e02d2b647d0 (diff)
downloadrust-7fdf06cdde49c8cd87e34e85a95c1fe90ebdb0c3.tar.gz
rust-7fdf06cdde49c8cd87e34e85a95c1fe90ebdb0c3.zip
Report const eval error inside the query
Diffstat (limited to 'src/test/ui/consts/const-err.rs')
-rw-r--r--src/test/ui/consts/const-err.rs13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/test/ui/consts/const-err.rs b/src/test/ui/consts/const-err.rs
index 8683f6a0231..7c59e8b9535 100644
--- a/src/test/ui/consts/const-err.rs
+++ b/src/test/ui/consts/const-err.rs
@@ -10,23 +10,18 @@
 
 // compile-flags: -Zforce-overflow-checks=on
 
-// these errors are not actually "const_err", they occur in codegen/consts
-// and are unconditional warnings that can't be denied or allowed
-
 #![allow(exceeding_bitshifts)]
-#![allow(const_err)]
+#![warn(const_err)]
 
 fn black_box<T>(_: T) {
     unimplemented!()
 }
 
-// Make sure that the two uses get two errors.
 const FOO: u8 = [5u8][1];
-//~^ ERROR constant evaluation error
-//~| index out of bounds: the len is 1 but the index is 1
+//~^ WARN any use of this value will cause an error
+//~| WARN any use of this value will cause an error
 
 fn main() {
     black_box((FOO, FOO));
-    //~^ ERROR referenced constant has errors
-    //~| ERROR could not evaluate constant
+    //~^ ERROR erroneous constant used
 }