about summary refs log tree commit diff
path: root/tests/ui/array-slice-vec/array_const_index-1.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/array-slice-vec/array_const_index-1.stderr')
-rw-r--r--tests/ui/array-slice-vec/array_const_index-1.stderr9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/array-slice-vec/array_const_index-1.stderr b/tests/ui/array-slice-vec/array_const_index-1.stderr
new file mode 100644
index 00000000000..591db268a99
--- /dev/null
+++ b/tests/ui/array-slice-vec/array_const_index-1.stderr
@@ -0,0 +1,9 @@
+error[E0080]: evaluation of constant value failed
+  --> $DIR/array_const_index-1.rs:2:16
+   |
+LL | const B: i32 = A[1];
+   |                ^^^^ index out of bounds: the length is 0 but the index is 1
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0080`.