]>
Commit | Line | Data |
---|---|---|
a1dfa0c6 | 1 | error: any use of this value will cause an error |
dfeec247 | 2 | --> $DIR/issue-50814.rs:15:21 |
a1dfa0c6 | 3 | | |
532ac7d7 | 4 | LL | const MAX: u8 = A::MAX + B::MAX; |
064997fb | 5 | | ------------- ^^^^^^^^^^^^^^^ attempt to compute `u8::MAX + u8::MAX`, which would overflow |
94b46f34 | 6 | | |
416331ca | 7 | = note: `#[deny(const_err)]` on by default |
5869c6ff XL |
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> | |
94b46f34 | 10 | |
17df50a5 | 11 | error[E0080]: evaluation of `foo::<i32>` failed |
5869c6ff | 12 | --> $DIR/issue-50814.rs:21:6 |
94b46f34 | 13 | | |
532ac7d7 | 14 | LL | &Sum::<U8,U8>::MAX |
5869c6ff | 15 | | ^^^^^^^^^^^^^^^^^ referenced constant has errors |
94b46f34 | 16 | |
04454e1e FG |
17 | note: the above error was encountered while instantiating `fn foo::<i32>` |
18 | --> $DIR/issue-50814.rs:26:5 | |
19 | | | |
20 | LL | foo(0); | |
21 | | ^^^^^^ | |
22 | ||
94b46f34 XL |
23 | error: aborting due to 2 previous errors |
24 | ||
25 | For more information about this error, try `rustc --explain E0080`. | |
064997fb FG |
26 | Future incompatibility report: Future breakage diagnostic: |
27 | error: any use of this value will cause an error | |
28 | --> $DIR/issue-50814.rs:15:21 | |
29 | | | |
30 | LL | const MAX: u8 = A::MAX + B::MAX; | |
31 | | ------------- ^^^^^^^^^^^^^^^ attempt to compute `u8::MAX + u8::MAX`, which would overflow | |
32 | | | |
33 | = note: `#[deny(const_err)]` on by default | |
34 | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! | |
35 | = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800> | |
36 |