about summary refs log tree commit diff
path: root/src/test/ui/array_const_index-0.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/array_const_index-0.rs
parent3476ac0bee4042653ecb00207ceb9e02d2b647d0 (diff)
downloadrust-7fdf06cdde49c8cd87e34e85a95c1fe90ebdb0c3.tar.gz
rust-7fdf06cdde49c8cd87e34e85a95c1fe90ebdb0c3.zip
Report const eval error inside the query
Diffstat (limited to 'src/test/ui/array_const_index-0.rs')
-rw-r--r--src/test/ui/array_const_index-0.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/test/ui/array_const_index-0.rs b/src/test/ui/array_const_index-0.rs
index 91007fcd63a..2403d50db39 100644
--- a/src/test/ui/array_const_index-0.rs
+++ b/src/test/ui/array_const_index-0.rs
@@ -11,8 +11,9 @@
 const A: &'static [i32] = &[];
 const B: i32 = (&A)[1];
 //~^ index out of bounds: the len is 0 but the index is 1
-//~| ERROR this constant cannot be used
+//~| ERROR any use of this value will cause an error
+//~| ERROR any use of this value will cause an error
 
 fn main() {
-    let _ = B;
+    let _ = B; //~ ERROR erroneous constant used
 }