summaryrefslogtreecommitdiffstats
path: root/src/test/ui/consts/array-literal-index-oob.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/consts/array-literal-index-oob.stderr')
-rw-r--r--src/test/ui/consts/array-literal-index-oob.stderr14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/ui/consts/array-literal-index-oob.stderr b/src/test/ui/consts/array-literal-index-oob.stderr
new file mode 100644
index 000000000..f96b8d48b
--- /dev/null
+++ b/src/test/ui/consts/array-literal-index-oob.stderr
@@ -0,0 +1,14 @@
+warning: this operation will panic at runtime
+ --> $DIR/array-literal-index-oob.rs:7:8
+ |
+LL | &{ [1, 2, 3][4] };
+ | ^^^^^^^^^^^^ index out of bounds: the length is 3 but the index is 4
+ |
+note: the lint level is defined here
+ --> $DIR/array-literal-index-oob.rs:4:20
+ |
+LL | #![warn(const_err, unconditional_panic)]
+ | ^^^^^^^^^^^^^^^^^^^
+
+warning: 1 warning emitted
+