|
1 |
| -error: attempt to divide by zero |
2 |
| - --> $DIR/promoted_errors.rs:8:20 |
| 1 | +error: this expression will panic at runtime |
| 2 | + --> $DIR/promoted_errors.rs:7:14 |
3 | 3 | |
|
4 |
| -LL | println!("{}", 1/(1-1)); |
5 |
| - | ^^^^^^^ |
| 4 | +LL | let _x = 0u32 - 1; |
| 5 | + | ^^^^^^^^ attempt to subtract with overflow |
6 | 6 | |
|
7 | 7 | note: lint level defined here
|
8 | 8 | --> $DIR/promoted_errors.rs:3:9
|
9 | 9 | |
|
10 | 10 | LL | #![deny(const_err)]
|
11 | 11 | | ^^^^^^^^^
|
12 | 12 |
|
| 13 | +error: attempt to divide by zero |
| 14 | + --> $DIR/promoted_errors.rs:9:20 |
| 15 | + | |
| 16 | +LL | println!("{}", 1/(1-1)); |
| 17 | + | ^^^^^^^ |
| 18 | + |
13 | 19 | error: reaching this expression at runtime will panic or abort
|
14 |
| - --> $DIR/promoted_errors.rs:8:20 |
| 20 | + --> $DIR/promoted_errors.rs:9:20 |
15 | 21 | |
|
16 | 22 | LL | println!("{}", 1/(1-1));
|
17 | 23 | | ^^^^^^^ attempt to divide by zero
|
18 | 24 |
|
19 | 25 | error: attempt to divide by zero
|
20 |
| - --> $DIR/promoted_errors.rs:11:14 |
| 26 | + --> $DIR/promoted_errors.rs:12:14 |
21 | 27 | |
|
22 | 28 | LL | let _x = 1/(1-1);
|
23 | 29 | | ^^^^^^^
|
24 | 30 |
|
25 | 31 | error: this expression will panic at runtime
|
26 |
| - --> $DIR/promoted_errors.rs:11:14 |
| 32 | + --> $DIR/promoted_errors.rs:12:14 |
27 | 33 | |
|
28 | 34 | LL | let _x = 1/(1-1);
|
29 | 35 | | ^^^^^^^ attempt to divide by zero
|
30 | 36 |
|
31 | 37 | error: attempt to divide by zero
|
32 |
| - --> $DIR/promoted_errors.rs:14:20 |
| 38 | + --> $DIR/promoted_errors.rs:15:20 |
33 | 39 | |
|
34 | 40 | LL | println!("{}", 1/(false as u32));
|
35 | 41 | | ^^^^^^^^^^^^^^^^
|
36 | 42 |
|
37 | 43 | error: reaching this expression at runtime will panic or abort
|
38 |
| - --> $DIR/promoted_errors.rs:14:20 |
| 44 | + --> $DIR/promoted_errors.rs:15:20 |
39 | 45 | |
|
40 | 46 | LL | println!("{}", 1/(false as u32));
|
41 | 47 | | ^^^^^^^^^^^^^^^^ attempt to divide by zero
|
42 | 48 |
|
43 | 49 | error: attempt to divide by zero
|
44 |
| - --> $DIR/promoted_errors.rs:17:14 |
| 50 | + --> $DIR/promoted_errors.rs:18:14 |
45 | 51 | |
|
46 | 52 | LL | let _x = 1/(false as u32);
|
47 | 53 | | ^^^^^^^^^^^^^^^^
|
48 | 54 |
|
49 | 55 | error: this expression will panic at runtime
|
50 |
| - --> $DIR/promoted_errors.rs:17:14 |
| 56 | + --> $DIR/promoted_errors.rs:18:14 |
51 | 57 | |
|
52 | 58 | LL | let _x = 1/(false as u32);
|
53 | 59 | | ^^^^^^^^^^^^^^^^ attempt to divide by zero
|
54 | 60 |
|
55 |
| -error: aborting due to 8 previous errors |
| 61 | +error: aborting due to 9 previous errors |
56 | 62 |
|
0 commit comments