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