39 lines
876 B
Plaintext
39 lines
876 B
Plaintext
error: attempt to negate with overflow
|
|
--> $DIR/const-err3.rs:16:13
|
|
|
|
|
LL | let a = -std::i8::MIN;
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
note: lint level defined here
|
|
--> $DIR/const-err3.rs:9:9
|
|
|
|
|
LL | #![deny(const_err)]
|
|
| ^^^^^^^^^
|
|
|
|
error: attempt to add with overflow
|
|
--> $DIR/const-err3.rs:18:13
|
|
|
|
|
LL | let b = 200u8 + 200u8 + 200u8;
|
|
| ^^^^^^^^^^^^^
|
|
|
|
error: attempt to multiply with overflow
|
|
--> $DIR/const-err3.rs:20:13
|
|
|
|
|
LL | let c = 200u8 * 4;
|
|
| ^^^^^^^^^
|
|
|
|
error: attempt to subtract with overflow
|
|
--> $DIR/const-err3.rs:22:13
|
|
|
|
|
LL | let d = 42u8 - (42u8 + 1);
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
error: index out of bounds: the len is 1 but the index is 1
|
|
--> $DIR/const-err3.rs:24:14
|
|
|
|
|
LL | let _e = [5u8][1];
|
|
| ^^^^^^^^
|
|
|
|
error: aborting due to 5 previous errors
|
|
|