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