Skip to content

Commit ccaabc9

Browse files
committed
re-bless ui tests
1 parent 0c7fd2c commit ccaabc9

4 files changed

+5
-53
lines changed

src/test/ui/consts/const-eval/promoted_errors.noopt.stderr

+1-13
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,3 @@
1-
warning: this arithmetic operation will overflow
2-
--> $DIR/promoted_errors.rs:13:5
3-
|
4-
LL | 0 - 1
5-
| ^^^^^ attempt to compute `0_u32 - 1_u32`, which would overflow
6-
|
7-
note: the lint level is defined here
8-
--> $DIR/promoted_errors.rs:9:20
9-
|
10-
LL | #![warn(const_err, arithmetic_overflow, unconditional_panic)]
11-
| ^^^^^^^^^^^^^^^^^^^
12-
131
warning: any use of this value will cause an error
142
--> $DIR/promoted_errors.rs:13:5
153
|
@@ -48,5 +36,5 @@ LL | | let _x: &'static i32 = &oob();
4836
LL | | };
4937
| |__-
5038

51-
warning: 3 warnings emitted
39+
warning: 2 warnings emitted
5240

src/test/ui/consts/const-eval/promoted_errors.opt.stderr

+1-25
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,3 @@
1-
warning: this arithmetic operation will overflow
2-
--> $DIR/promoted_errors.rs:13:5
3-
|
4-
LL | 0 - 1
5-
| ^^^^^ attempt to compute `0_u32 - 1_u32`, which would overflow
6-
|
7-
note: the lint level is defined here
8-
--> $DIR/promoted_errors.rs:9:20
9-
|
10-
LL | #![warn(const_err, arithmetic_overflow, unconditional_panic)]
11-
| ^^^^^^^^^^^^^^^^^^^
12-
13-
warning: this operation will panic at runtime
14-
--> $DIR/promoted_errors.rs:17:5
15-
|
16-
LL | 1 / 0
17-
| ^^^^^ attempt to divide `1_i32` by zero
18-
|
19-
note: the lint level is defined here
20-
--> $DIR/promoted_errors.rs:9:41
21-
|
22-
LL | #![warn(const_err, arithmetic_overflow, unconditional_panic)]
23-
| ^^^^^^^^^^^^^^^^^^^
24-
251
warning: any use of this value will cause an error
262
--> $DIR/promoted_errors.rs:17:5
273
|
@@ -60,5 +36,5 @@ LL | | let _x: &'static i32 = &oob();
6036
LL | | };
6137
| |__-
6238

63-
warning: 4 warnings emitted
39+
warning: 2 warnings emitted
6440

src/test/ui/consts/const-eval/promoted_errors.opt_with_overflow_checks.stderr

+1-13
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,3 @@
1-
warning: this arithmetic operation will overflow
2-
--> $DIR/promoted_errors.rs:13:5
3-
|
4-
LL | 0 - 1
5-
| ^^^^^ attempt to compute `0_u32 - 1_u32`, which would overflow
6-
|
7-
note: the lint level is defined here
8-
--> $DIR/promoted_errors.rs:9:20
9-
|
10-
LL | #![warn(const_err, arithmetic_overflow, unconditional_panic)]
11-
| ^^^^^^^^^^^^^^^^^^^
12-
131
warning: any use of this value will cause an error
142
--> $DIR/promoted_errors.rs:13:5
153
|
@@ -48,5 +36,5 @@ LL | | let _x: &'static i32 = &oob();
4836
LL | | };
4937
| |__-
5038

51-
warning: 3 warnings emitted
39+
warning: 2 warnings emitted
5240

src/test/ui/consts/const-eval/promoted_errors.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010

1111
// The only way to have promoteds that fail is in `const fn` called from `const`/`static`.
1212
const fn overflow() -> u32 {
13-
0 - 1 //~WARN arithmetic_overflow
13+
0 - 1
1414
//[opt_with_overflow_checks,noopt]~^ WARN any use of this value will cause an error
1515
}
1616
const fn div_by_zero1() -> i32 {
17-
1 / 0 //[opt]~WARN unconditional_panic
17+
1 / 0
1818
//[opt]~^ WARN any use of this value will cause an error
1919
}
2020
const fn div_by_zero2() -> i32 {

0 commit comments

Comments
 (0)