]> git.proxmox.com Git - rustc.git/blob - src/test/ui/consts/const-eval/issue-43197.stderr
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / ui / consts / const-eval / issue-43197.stderr
1 warning: any use of this value will cause an error
2 --> $DIR/issue-43197.rs:10:20
3 |
4 LL | const X: u32 = 0 - 1;
5 | ---------------^^^^^-
6 | |
7 | attempt to compute `0_u32 - 1_u32`, which would overflow
8 |
9 note: the lint level is defined here
10 --> $DIR/issue-43197.rs:3:9
11 |
12 LL | #![warn(const_err)]
13 | ^^^^^^^^^
14
15 warning: any use of this value will cause an error
16 --> $DIR/issue-43197.rs:12:24
17 |
18 LL | const Y: u32 = foo(0 - 1);
19 | -------------------^^^^^--
20 | |
21 | attempt to compute `0_u32 - 1_u32`, which would overflow
22
23 error[E0080]: evaluation of constant expression failed
24 --> $DIR/issue-43197.rs:14:23
25 |
26 LL | println!("{} {}", X, Y);
27 | ^ referenced constant has errors
28
29 warning: erroneous constant used
30 --> $DIR/issue-43197.rs:14:23
31 |
32 LL | println!("{} {}", X, Y);
33 | ^ referenced constant has errors
34
35 error[E0080]: evaluation of constant expression failed
36 --> $DIR/issue-43197.rs:14:26
37 |
38 LL | println!("{} {}", X, Y);
39 | ^ referenced constant has errors
40
41 warning: erroneous constant used
42 --> $DIR/issue-43197.rs:14:26
43 |
44 LL | println!("{} {}", X, Y);
45 | ^ referenced constant has errors
46
47 error: aborting due to 2 previous errors; 4 warnings emitted
48
49 For more information about this error, try `rustc --explain E0080`.