2018-08-08 07:28:26 -05:00
|
|
|
error: attempt to shift left with overflow
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/lint-exceeding-bitshifts.rs:7:15
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | let n = 1u8 << 8; //~ ERROR: attempt to shift left with overflow
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
|
note: lint level defined here
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/lint-exceeding-bitshifts.rs:1:9
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | #![deny(exceeding_bitshifts, const_err)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: attempt to shift left with overflow
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/lint-exceeding-bitshifts.rs:9:15
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | let n = 1u16 << 16; //~ ERROR: attempt to shift left with overflow
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error: attempt to shift left with overflow
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/lint-exceeding-bitshifts.rs:11:15
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | let n = 1u32 << 32; //~ ERROR: attempt to shift left with overflow
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error: attempt to shift left with overflow
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/lint-exceeding-bitshifts.rs:13:15
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | let n = 1u64 << 64; //~ ERROR: attempt to shift left with overflow
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error: attempt to shift left with overflow
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/lint-exceeding-bitshifts.rs:15:15
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | let n = 1i8 << 8; //~ ERROR: attempt to shift left with overflow
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
error: attempt to shift left with overflow
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/lint-exceeding-bitshifts.rs:17:15
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | let n = 1i16 << 16; //~ ERROR: attempt to shift left with overflow
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error: attempt to shift left with overflow
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/lint-exceeding-bitshifts.rs:19:15
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | let n = 1i32 << 32; //~ ERROR: attempt to shift left with overflow
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error: attempt to shift left with overflow
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/lint-exceeding-bitshifts.rs:21:15
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | let n = 1i64 << 64; //~ ERROR: attempt to shift left with overflow
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error: attempt to shift right with overflow
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/lint-exceeding-bitshifts.rs:24:15
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | let n = 1u8 >> 8; //~ ERROR: attempt to shift right with overflow
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
error: attempt to shift right with overflow
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/lint-exceeding-bitshifts.rs:26:15
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | let n = 1u16 >> 16; //~ ERROR: attempt to shift right with overflow
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error: attempt to shift right with overflow
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/lint-exceeding-bitshifts.rs:28:15
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | let n = 1u32 >> 32; //~ ERROR: attempt to shift right with overflow
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error: attempt to shift right with overflow
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/lint-exceeding-bitshifts.rs:30:15
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | let n = 1u64 >> 64; //~ ERROR: attempt to shift right with overflow
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error: attempt to shift right with overflow
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/lint-exceeding-bitshifts.rs:32:15
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | let n = 1i8 >> 8; //~ ERROR: attempt to shift right with overflow
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
error: attempt to shift right with overflow
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/lint-exceeding-bitshifts.rs:34:15
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | let n = 1i16 >> 16; //~ ERROR: attempt to shift right with overflow
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error: attempt to shift right with overflow
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/lint-exceeding-bitshifts.rs:36:15
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | let n = 1i32 >> 32; //~ ERROR: attempt to shift right with overflow
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error: attempt to shift right with overflow
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/lint-exceeding-bitshifts.rs:38:15
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | let n = 1i64 >> 64; //~ ERROR: attempt to shift right with overflow
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error: attempt to shift left with overflow
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/lint-exceeding-bitshifts.rs:42:15
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | let n = n << 8; //~ ERROR: attempt to shift left with overflow
|
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
error: attempt to shift left with overflow
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/lint-exceeding-bitshifts.rs:44:15
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | let n = 1u8 << -8; //~ ERROR: attempt to shift left with overflow
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
error: aborting due to 18 previous errors
|
|
|
|
|