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