Skip to content

Commit

Permalink
re-bless ui tests
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Jan 22, 2021
1 parent 0c7fd2c commit ccaabc9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 53 deletions.
14 changes: 1 addition & 13 deletions src/test/ui/consts/const-eval/promoted_errors.noopt.stderr
Original file line number Diff line number Diff line change
@@ -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
|
Expand Down Expand Up @@ -48,5 +36,5 @@ LL | | let _x: &'static i32 = &oob();
LL | | };
| |__-

warning: 3 warnings emitted
warning: 2 warnings emitted

26 changes: 1 addition & 25 deletions src/test/ui/consts/const-eval/promoted_errors.opt.stderr
Original file line number Diff line number Diff line change
@@ -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
|
Expand Down Expand Up @@ -60,5 +36,5 @@ LL | | let _x: &'static i32 = &oob();
LL | | };
| |__-

warning: 4 warnings emitted
warning: 2 warnings emitted

Original file line number Diff line number Diff line change
@@ -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
|
Expand Down Expand Up @@ -48,5 +36,5 @@ LL | | let _x: &'static i32 = &oob();
LL | | };
| |__-

warning: 3 warnings emitted
warning: 2 warnings emitted

4 changes: 2 additions & 2 deletions src/test/ui/consts/const-eval/promoted_errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit ccaabc9

Please sign in to comment.