1 error: any use of this value will cause an error
2 --> $DIR/issue-50814.rs:23:5
4 LL | const MAX: u8 = A::MAX + B::MAX; //~ ERROR any use of this value will cause an error
5 | ^^^^^^^^^^^^^^^^---------------^
7 | attempt to add with overflow
9 = note: #[deny(const_err)] on by default
11 error[E0080]: evaluation of constant expression failed
12 --> $DIR/issue-50814.rs:27:5
14 LL | &Sum::<U8,U8>::MAX //~ ERROR E0080
17 | referenced constant has errors
19 error: aborting due to 2 previous errors
21 For more information about this error, try `rustc --explain E0080`.