about summary refs log tree commit diff
path: root/src/test/ui/array_const_index-0.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/array_const_index-0.stderr')
-rw-r--r--src/test/ui/array_const_index-0.stderr19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/test/ui/array_const_index-0.stderr b/src/test/ui/array_const_index-0.stderr
index b71d224f4f0..95ed88bde10 100644
--- a/src/test/ui/array_const_index-0.stderr
+++ b/src/test/ui/array_const_index-0.stderr
@@ -1,4 +1,4 @@
-error: this constant cannot be used
+error: any use of this value will cause an error
   --> $DIR/array_const_index-0.rs:12:1
    |
 LL | const B: i32 = (&A)[1];
@@ -8,5 +8,20 @@ LL | const B: i32 = (&A)[1];
    |
    = note: #[deny(const_err)] on by default
 
-error: aborting due to previous error
+error: any use of this value will cause an error
+  --> $DIR/array_const_index-0.rs:12:1
+   |
+LL | const B: i32 = (&A)[1];
+   | ^^^^^^^^^^^^^^^-------^
+   |                |
+   |                index out of bounds: the len is 0 but the index is 1
+
+error[E0080]: erroneous constant used
+  --> $DIR/array_const_index-0.rs:18:13
+   |
+LL |     let _ = B; //~ ERROR erroneous constant used
+   |             ^ referenced constant has errors
+
+error: aborting due to 3 previous errors
 
+For more information about this error, try `rustc --explain E0080`.