From cf94bdc0742c13e2a0cac864c478b8626b266e1b Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:11:38 +0200 Subject: Merging upstream version 1.66.0+dfsg1. Signed-off-by: Daniel Baumann --- .../ui/consts/const-eval/erroneous-const.stderr | 45 +++------------------- 1 file changed, 5 insertions(+), 40 deletions(-) (limited to 'src/test/ui/consts/const-eval/erroneous-const.stderr') diff --git a/src/test/ui/consts/const-eval/erroneous-const.stderr b/src/test/ui/consts/const-eval/erroneous-const.stderr index adfb4cc61..33579135d 100644 --- a/src/test/ui/consts/const-eval/erroneous-const.stderr +++ b/src/test/ui/consts/const-eval/erroneous-const.stderr @@ -1,56 +1,21 @@ -warning: this operation will panic at runtime +error[E0080]: evaluation of `PrintName::::VOID` failed --> $DIR/erroneous-const.rs:6:22 | LL | const VOID: () = [()][2]; | ^^^^^^^ index out of bounds: the length is 1 but the index is 2 - | -note: the lint level is defined here - --> $DIR/erroneous-const.rs:2:20 - | -LL | #![warn(const_err, unconditional_panic)] - | ^^^^^^^^^^^^^^^^^^^ - -warning: any use of this value will cause an error - --> $DIR/erroneous-const.rs:6:22 - | -LL | const VOID: () = [()][2]; - | -------------- ^^^^^^^ index out of bounds: the length is 1 but the index is 2 - | -note: the lint level is defined here - --> $DIR/erroneous-const.rs:2:9 - | -LL | #![warn(const_err, unconditional_panic)] - | ^^^^^^^^^ - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #71800 error[E0080]: could not evaluate static initializer - --> $DIR/erroneous-const.rs:15:17 + --> $DIR/erroneous-const.rs:13:17 | LL | let _ = PrintName::::VOID; | ^^^^^^^^^^^^^^^^^^^^ | | | referenced constant has errors - | inside `no_codegen::` at $DIR/erroneous-const.rs:15:17 + | inside `no_codegen::` at $DIR/erroneous-const.rs:13:17 ... LL | pub static FOO: () = no_codegen::(); - | ------------------- inside `FOO` at $DIR/erroneous-const.rs:19:22 + | ------------------- inside `FOO` at $DIR/erroneous-const.rs:17:22 -error: aborting due to previous error; 2 warnings emitted +error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0080`. -Future incompatibility report: Future breakage diagnostic: -warning: any use of this value will cause an error - --> $DIR/erroneous-const.rs:6:22 - | -LL | const VOID: () = [()][2]; - | -------------- ^^^^^^^ index out of bounds: the length is 1 but the index is 2 - | -note: the lint level is defined here - --> $DIR/erroneous-const.rs:2:9 - | -LL | #![warn(const_err, unconditional_panic)] - | ^^^^^^^^^ - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #71800 - -- cgit v1.2.3