diff --git a/src/test/ui/consts/const-eval/promoted_errors.noopt.stderr b/src/test/ui/consts/const-eval/promoted_errors.noopt.stderr index b71235e51c0a0..1cd1be5309b90 100644 --- a/src/test/ui/consts/const-eval/promoted_errors.noopt.stderr +++ b/src/test/ui/consts/const-eval/promoted_errors.noopt.stderr @@ -1,15 +1,3 @@ -warning: this arithmetic operation will overflow - --> $DIR/promoted_errors.rs:13:5 - | -LL | 0 - 1 - | ^^^^^ attempt to compute `0_u32 - 1_u32`, which would overflow - | -note: the lint level is defined here - --> $DIR/promoted_errors.rs:9:20 - | -LL | #![warn(const_err, arithmetic_overflow, unconditional_panic)] - | ^^^^^^^^^^^^^^^^^^^ - warning: any use of this value will cause an error --> $DIR/promoted_errors.rs:13:5 | @@ -48,5 +36,5 @@ LL | | let _x: &'static i32 = &oob(); LL | | }; | |__- -warning: 3 warnings emitted +warning: 2 warnings emitted diff --git a/src/test/ui/consts/const-eval/promoted_errors.opt.stderr b/src/test/ui/consts/const-eval/promoted_errors.opt.stderr index e5108f67e16c2..ca62e21b61385 100644 --- a/src/test/ui/consts/const-eval/promoted_errors.opt.stderr +++ b/src/test/ui/consts/const-eval/promoted_errors.opt.stderr @@ -1,27 +1,3 @@ -warning: this arithmetic operation will overflow - --> $DIR/promoted_errors.rs:13:5 - | -LL | 0 - 1 - | ^^^^^ attempt to compute `0_u32 - 1_u32`, which would overflow - | -note: the lint level is defined here - --> $DIR/promoted_errors.rs:9:20 - | -LL | #![warn(const_err, arithmetic_overflow, unconditional_panic)] - | ^^^^^^^^^^^^^^^^^^^ - -warning: this operation will panic at runtime - --> $DIR/promoted_errors.rs:17:5 - | -LL | 1 / 0 - | ^^^^^ attempt to divide `1_i32` by zero - | -note: the lint level is defined here - --> $DIR/promoted_errors.rs:9:41 - | -LL | #![warn(const_err, arithmetic_overflow, unconditional_panic)] - | ^^^^^^^^^^^^^^^^^^^ - warning: any use of this value will cause an error --> $DIR/promoted_errors.rs:17:5 | @@ -60,5 +36,5 @@ LL | | let _x: &'static i32 = &oob(); LL | | }; | |__- -warning: 4 warnings emitted +warning: 2 warnings emitted diff --git a/src/test/ui/consts/const-eval/promoted_errors.opt_with_overflow_checks.stderr b/src/test/ui/consts/const-eval/promoted_errors.opt_with_overflow_checks.stderr index b71235e51c0a0..1cd1be5309b90 100644 --- a/src/test/ui/consts/const-eval/promoted_errors.opt_with_overflow_checks.stderr +++ b/src/test/ui/consts/const-eval/promoted_errors.opt_with_overflow_checks.stderr @@ -1,15 +1,3 @@ -warning: this arithmetic operation will overflow - --> $DIR/promoted_errors.rs:13:5 - | -LL | 0 - 1 - | ^^^^^ attempt to compute `0_u32 - 1_u32`, which would overflow - | -note: the lint level is defined here - --> $DIR/promoted_errors.rs:9:20 - | -LL | #![warn(const_err, arithmetic_overflow, unconditional_panic)] - | ^^^^^^^^^^^^^^^^^^^ - warning: any use of this value will cause an error --> $DIR/promoted_errors.rs:13:5 | @@ -48,5 +36,5 @@ LL | | let _x: &'static i32 = &oob(); LL | | }; | |__- -warning: 3 warnings emitted +warning: 2 warnings emitted diff --git a/src/test/ui/consts/const-eval/promoted_errors.rs b/src/test/ui/consts/const-eval/promoted_errors.rs index 1f3b3eef509b1..a2136c8d09be4 100644 --- a/src/test/ui/consts/const-eval/promoted_errors.rs +++ b/src/test/ui/consts/const-eval/promoted_errors.rs @@ -10,11 +10,11 @@ // The only way to have promoteds that fail is in `const fn` called from `const`/`static`. const fn overflow() -> u32 { - 0 - 1 //~WARN arithmetic_overflow + 0 - 1 //[opt_with_overflow_checks,noopt]~^ WARN any use of this value will cause an error } const fn div_by_zero1() -> i32 { - 1 / 0 //[opt]~WARN unconditional_panic + 1 / 0 //[opt]~^ WARN any use of this value will cause an error } const fn div_by_zero2() -> i32 {