re-bless ui tests

This commit is contained in:
Ralf Jung 2021-01-22 10:56:28 +01:00
parent 0c7fd2c685
commit ccaabc9479
4 changed files with 5 additions and 53 deletions

View File

@ -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 warning: any use of this value will cause an error
--> $DIR/promoted_errors.rs:13:5 --> $DIR/promoted_errors.rs:13:5
| |
@ -48,5 +36,5 @@ LL | | let _x: &'static i32 = &oob();
LL | | }; LL | | };
| |__- | |__-
warning: 3 warnings emitted warning: 2 warnings emitted

View File

@ -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 warning: any use of this value will cause an error
--> $DIR/promoted_errors.rs:17:5 --> $DIR/promoted_errors.rs:17:5
| |
@ -60,5 +36,5 @@ LL | | let _x: &'static i32 = &oob();
LL | | }; LL | | };
| |__- | |__-
warning: 4 warnings emitted warning: 2 warnings emitted

View File

@ -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 warning: any use of this value will cause an error
--> $DIR/promoted_errors.rs:13:5 --> $DIR/promoted_errors.rs:13:5
| |
@ -48,5 +36,5 @@ LL | | let _x: &'static i32 = &oob();
LL | | }; LL | | };
| |__- | |__-
warning: 3 warnings emitted warning: 2 warnings emitted

View File

@ -10,11 +10,11 @@
// The only way to have promoteds that fail is in `const fn` called from `const`/`static`. // The only way to have promoteds that fail is in `const fn` called from `const`/`static`.
const fn overflow() -> u32 { 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 //[opt_with_overflow_checks,noopt]~^ WARN any use of this value will cause an error
} }
const fn div_by_zero1() -> i32 { 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 //[opt]~^ WARN any use of this value will cause an error
} }
const fn div_by_zero2() -> i32 { const fn div_by_zero2() -> i32 {