From 698f8c2f01ea549d77d7dc3338a12e04c11057b9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:02:58 +0200 Subject: Adding upstream version 1.64.0+dfsg1. Signed-off-by: Daniel Baumann --- src/test/ui/consts/array-literal-index-oob.stderr | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/test/ui/consts/array-literal-index-oob.stderr (limited to 'src/test/ui/consts/array-literal-index-oob.stderr') 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 + -- cgit v1.2.3