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

20 lines
648 B
Plaintext
Raw Normal View History

error[E0080]: evaluation of constant value failed
2018-12-25 09:56:47 -06:00
--> $DIR/const-eval-overflow-3.rs:20:11
2018-08-08 07:28:26 -05:00
|
LL | = [0; (i8::MAX + 1) as usize];
| ^^^^^^^^^^^^^ attempt to add with overflow
2018-08-08 07:28:26 -05:00
error[E0308]: mismatched types
--> $DIR/const-eval-overflow-3.rs:20:7
|
LL | = [0; (i8::MAX + 1) as usize];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `128usize`, found `(i8::MAX + 1) as usize`
|
= note: expected array `[u32; 128]`
found array `[u32; _]`
error: aborting due to 2 previous errors
2018-08-08 07:28:26 -05:00
Some errors have detailed explanations: E0080, E0308.
For more information about an error, try `rustc --explain E0080`.