From ccaabc9479c5627c38aa3a693f765a400b92e32d Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Fri, 22 Jan 2021 10:56:28 +0100 Subject: [PATCH] re-bless ui tests --- .../const-eval/promoted_errors.noopt.stderr | 14 +--------- .../const-eval/promoted_errors.opt.stderr | 26 +------------------ ...ted_errors.opt_with_overflow_checks.stderr | 14 +--------- .../ui/consts/const-eval/promoted_errors.rs | 4 +-- 4 files changed, 5 insertions(+), 53 deletions(-) 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 b71235e51c0..1cd1be5309b 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 e5108f67e16..ca62e21b613 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 b71235e51c0..1cd1be5309b 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 1f3b3eef509..a2136c8d09b 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 {