]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-eval/issue-43197.stderr
Rollup merge of #80733 - steffahn:prettify_pin_links, r=jyn514
[rust.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    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
15    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
16
17 warning: any use of this value will cause an error
18   --> $DIR/issue-43197.rs:13:24
19    |
20 LL |     const Y: u32 = foo(0 - 1);
21    |     -------------------^^^^^--
22    |                        |
23    |                        attempt to compute `0_u32 - 1_u32`, which would overflow
24    |
25    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
26    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
27
28 error[E0080]: evaluation of constant value failed
29   --> $DIR/issue-43197.rs:16:23
30    |
31 LL |     println!("{} {}", X, Y);
32    |                       ^ referenced constant has errors
33
34 warning: erroneous constant used
35   --> $DIR/issue-43197.rs:16:23
36    |
37 LL |     println!("{} {}", X, Y);
38    |                       ^ referenced constant has errors
39    |
40    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
41    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
42
43 error[E0080]: evaluation of constant value failed
44   --> $DIR/issue-43197.rs:16:26
45    |
46 LL |     println!("{} {}", X, Y);
47    |                          ^ referenced constant has errors
48
49 warning: erroneous constant used
50   --> $DIR/issue-43197.rs:16:26
51    |
52 LL |     println!("{} {}", X, Y);
53    |                          ^ referenced constant has errors
54    |
55    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
56    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
57
58 error: aborting due to 2 previous errors; 4 warnings emitted
59
60 For more information about this error, try `rustc --explain E0080`.