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