blob: 058c8730d7c9e23422da03814d608204a1d1e96d [file] [log] [blame]
error: attempt to add with overflow
--> $DIR/const-eval-overflow-4.rs:24:13
|
LL | : [u32; (i8::MAX as i8 + 1i8) as usize]
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: #[deny(const_err)] on by default
error[E0080]: could not evaluate constant expression
--> $DIR/const-eval-overflow-4.rs:22:1
|
LL | / const A_I8_T
LL | | //~^ ERROR could not evaluate constant expression
LL | | : [u32; (i8::MAX as i8 + 1i8) as usize]
| | --------------------- attempt to add with overflow
LL | | //~^ ERROR attempt to add with overflow
LL | | = [0; (i8::MAX as usize) + 1];
| |__________________________________^
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0080`.