1 error[E0080]: referenced constant
2 --> $DIR/issue-50814.rs:27:5
4 LL | const MAX: u8 = A::MAX + B::MAX;
5 | --------------- attempt to add with overflow
7 LL | &Sum::<U8,U8>::MAX //~ ERROR erroneous constant used
10 error[E0080]: erroneous constant used
11 --> $DIR/issue-50814.rs:27:5
13 LL | &Sum::<U8,U8>::MAX //~ ERROR erroneous constant used
16 | referenced constant has errors
18 error: aborting due to 2 previous errors
20 For more information about this error, try `rustc --explain E0080`.