]> git.proxmox.com Git - rustc.git/blob - src/test/ui/associated-consts/defaults-not-assumed-fail.stderr
New upstream version 1.64.0+dfsg1
[rustc.git] / src / test / ui / associated-consts / defaults-not-assumed-fail.stderr
1 error: any use of this value will cause an error
2 --> $DIR/defaults-not-assumed-fail.rs:8:19
3 |
4 LL | const B: u8 = Self::A + 1;
5 | ----------- ^^^^^^^^^^^ attempt to compute `u8::MAX + 1_u8`, which would overflow
6 |
7 = note: `#[deny(const_err)]` on by default
8 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
9 = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
10
11 error[E0080]: evaluation of constant value failed
12 --> $DIR/defaults-not-assumed-fail.rs:34:16
13 |
14 LL | assert_eq!(<() as Tr>::B, 0); // causes the error above
15 | ^^^^^^^^^^^^^ referenced constant has errors
16
17 error: erroneous constant used
18 --> $DIR/defaults-not-assumed-fail.rs:34:5
19 |
20 LL | assert_eq!(<() as Tr>::B, 0); // causes the error above
21 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ referenced constant has errors
22 |
23 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
24 = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
25 = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
26
27 error: aborting due to 3 previous errors
28
29 For more information about this error, try `rustc --explain E0080`.
30 Future incompatibility report: Future breakage diagnostic:
31 error: any use of this value will cause an error
32 --> $DIR/defaults-not-assumed-fail.rs:8:19
33 |
34 LL | const B: u8 = Self::A + 1;
35 | ----------- ^^^^^^^^^^^ attempt to compute `u8::MAX + 1_u8`, which would overflow
36 |
37 = note: `#[deny(const_err)]` on by default
38 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
39 = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
40
41 Future breakage diagnostic:
42 error: erroneous constant used
43 --> $DIR/defaults-not-assumed-fail.rs:34:5
44 |
45 LL | assert_eq!(<() as Tr>::B, 0); // causes the error above
46 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ referenced constant has errors
47 |
48 = note: `#[deny(const_err)]` on by default
49 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
50 = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
51 = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
52