error: any use of this value will cause an error --> $DIR/issue-50814.rs:13:5 | LL | const MAX: u8 = A::MAX + B::MAX; //~ ERROR any use of this value will cause an error | ^^^^^^^^^^^^^^^^---------------^ | | | 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 //~ ERROR E0080 | ^----------------- | | | referenced constant has errors error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0080`.