Files
rust/src/test/ui/consts/const-eval/const-eval-overflow-4.stderr

23 lines
768 B
Plaintext
Raw Normal View History

error: attempt to add with overflow
2018-06-02 23:38:57 +02:00
--> $DIR/const-eval-overflow-4.rs:24:13
|
LL | : [u32; (i8::MAX as i8 + 1i8) as usize]
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: #[deny(const_err)] on by default
2018-06-02 23:38:57 +02:00
error[E0080]: could not evaluate constant expression
--> $DIR/const-eval-overflow-4.rs:22:1
|
2018-06-02 23:38:57 +02:00
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
2018-03-03 15:59:40 +01:00
For more information about this error, try `rustc --explain E0080`.