]>
Commit | Line | Data |
---|---|---|
94b46f34 | 1 | warning: this expression will panic at runtime |
0531ce1d XL |
2 | --> $DIR/promoted_errors.rs:17:14 |
3 | | | |
4 | LL | let _x = 0u32 - 1; | |
83c7162d | 5 | | ^^^^^^^^ attempt to subtract with overflow |
94b46f34 XL |
6 | | |
7 | note: lint level defined here | |
8 | --> $DIR/promoted_errors.rs:11:9 | |
9 | | | |
10 | LL | #![warn(const_err)] | |
11 | | ^^^^^^^^^ | |
0531ce1d XL |
12 | |
13 | warning: attempt to divide by zero | |
14 | --> $DIR/promoted_errors.rs:19:20 | |
15 | | | |
16 | LL | println!("{}", 1/(1-1)); | |
17 | | ^^^^^^^ | |
18 | ||
94b46f34 | 19 | warning: this expression will panic at runtime |
0531ce1d XL |
20 | --> $DIR/promoted_errors.rs:19:20 |
21 | | | |
22 | LL | println!("{}", 1/(1-1)); | |
83c7162d | 23 | | ^^^^^^^ attempt to divide by zero |
0531ce1d XL |
24 | |
25 | warning: attempt to divide by zero | |
26 | --> $DIR/promoted_errors.rs:22:14 | |
27 | | | |
28 | LL | let _x = 1/(1-1); | |
29 | | ^^^^^^^ | |
30 | ||
94b46f34 | 31 | warning: this expression will panic at runtime |
0531ce1d XL |
32 | --> $DIR/promoted_errors.rs:22:14 |
33 | | | |
34 | LL | let _x = 1/(1-1); | |
83c7162d | 35 | | ^^^^^^^ attempt to divide by zero |
0531ce1d | 36 | |
94b46f34 | 37 | warning: this expression will panic at runtime |
0531ce1d XL |
38 | --> $DIR/promoted_errors.rs:25:20 |
39 | | | |
40 | LL | println!("{}", 1/(false as u32)); | |
83c7162d | 41 | | ^^^^^^^^^^^^^^^^ attempt to divide by zero |
0531ce1d | 42 |