|
1 | 1 | warning: constant evaluation error
|
2 |
| - --> $DIR/promoted_errors.rs:16:20 |
| 2 | + --> $DIR/promoted_errors.rs:17:14 |
3 | 3 | |
|
4 |
| -LL | println!("{}", 0u32 - 1); |
5 |
| - | ^^^^^^^^ attempt to subtract with overflow |
| 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:11:9
|
9 | 9 | |
|
10 | 10 | LL | #![warn(const_err)]
|
11 | 11 | | ^^^^^^^^^
|
12 | 12 |
|
13 |
| -warning: constant evaluation error |
14 |
| - --> $DIR/promoted_errors.rs:16:20 |
15 |
| - | |
16 |
| -LL | println!("{}", 0u32 - 1); |
17 |
| - | ^^^^^^^^ attempt to subtract with overflow |
18 |
| - |
19 |
| -warning: constant evaluation error |
20 |
| - --> $DIR/promoted_errors.rs:19:14 |
21 |
| - | |
22 |
| -LL | let _x = 0u32 - 1; |
23 |
| - | ^^^^^^^^ attempt to subtract with overflow |
24 |
| - |
25 | 13 | warning: attempt to divide by zero
|
26 |
| - --> $DIR/promoted_errors.rs:21:20 |
| 14 | + --> $DIR/promoted_errors.rs:19:20 |
27 | 15 | |
|
28 | 16 | LL | println!("{}", 1/(1-1));
|
29 | 17 | | ^^^^^^^
|
30 | 18 |
|
31 | 19 | warning: constant evaluation error
|
32 |
| - --> $DIR/promoted_errors.rs:21:20 |
| 20 | + --> $DIR/promoted_errors.rs:19:20 |
33 | 21 | |
|
34 | 22 | LL | println!("{}", 1/(1-1));
|
35 | 23 | | ^^^^^^^ attempt to divide by zero
|
36 | 24 |
|
37 | 25 | warning: attempt to divide by zero
|
38 |
| - --> $DIR/promoted_errors.rs:24:14 |
| 26 | + --> $DIR/promoted_errors.rs:22:14 |
39 | 27 | |
|
40 | 28 | LL | let _x = 1/(1-1);
|
41 | 29 | | ^^^^^^^
|
42 | 30 |
|
43 | 31 | warning: constant evaluation error
|
44 |
| - --> $DIR/promoted_errors.rs:24:14 |
| 32 | + --> $DIR/promoted_errors.rs:22:14 |
45 | 33 | |
|
46 | 34 | LL | let _x = 1/(1-1);
|
47 | 35 | | ^^^^^^^ attempt to divide by zero
|
48 | 36 |
|
49 | 37 | warning: constant evaluation error
|
50 |
| - --> $DIR/promoted_errors.rs:27:20 |
| 38 | + --> $DIR/promoted_errors.rs:25:20 |
51 | 39 | |
|
52 | 40 | LL | println!("{}", 1/(false as u32));
|
53 | 41 | | ^^^^^^^^^^^^^^^^ attempt to divide by zero
|
|
0 commit comments