@@ -8,19 +8,36 @@ LL | const MAX: u8 = A::MAX + B::MAX;
8
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
9
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
10
10
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
+
11
28
error[E0080]: evaluation of `foo::<i32>` failed
12
- --> $DIR/issue-50814.rs:21 :6
29
+ --> $DIR/issue-50814.rs:23 :6
13
30
|
14
31
LL | &Sum::<U8,U8>::MAX
15
32
| ^^^^^^^^^^^^^^^^^ referenced constant has errors
16
33
17
34
note: the above error was encountered while instantiating `fn foo::<i32>`
18
- --> $DIR/issue-50814.rs:26 :5
35
+ --> $DIR/issue-50814.rs:29 :5
19
36
|
20
37
LL | foo(0);
21
38
| ^^^^^^
22
39
23
- error: aborting due to 2 previous errors
40
+ error: aborting due to 4 previous errors
24
41
25
42
For more information about this error, try `rustc --explain E0080`.
26
43
Future incompatibility report: Future breakage diagnostic:
0 commit comments