@@ -8,19 +8,36 @@ LL | const MAX: u8 = A::MAX + B::MAX;
88 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
99 = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
1010
11+ error[E0080]: evaluation of `foo::<T>` failed
12+ --> $DIR/issue-50814.rs:23:6
13+ |
14+ LL | &Sum::<U8,U8>::MAX
15+ | ^^^^^^^^^^^^^^^^^ referenced constant has errors
16+
17+ error: any use of this value will cause an error
18+ --> $DIR/issue-50814.rs:15:21
19+ |
20+ LL | const MAX: u8 = A::MAX + B::MAX;
21+ | ----------------^^^^^^^^^^^^^^^-
22+ | |
23+ | attempt to compute `u8::MAX + u8::MAX`, 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+
1128error[E0080]: evaluation of `foo::<i32>` failed
12- --> $DIR/issue-50814.rs:21 :6
29+ --> $DIR/issue-50814.rs:23 :6
1330 |
1431LL | &Sum::<U8,U8>::MAX
1532 | ^^^^^^^^^^^^^^^^^ referenced constant has errors
1633
1734note: the above error was encountered while instantiating `fn foo::<i32>`
18- --> $DIR/issue-50814.rs:26 :5
35+ --> $DIR/issue-50814.rs:29 :5
1936 |
2037LL | foo(0);
2138 | ^^^^^^
2239
23- error: aborting due to 2 previous errors
40+ error: aborting due to 4 previous errors
2441
2542For more information about this error, try `rustc --explain E0080`.
2643Future incompatibility report: Future breakage diagnostic:
0 commit comments