4 #![deny(exceeding_bitshifts, const_err)]
5 #![allow(unused_variables)]
10 let n = 1u8 << 8; //~ ERROR: attempt to shift left with overflow
12 let n = 1u16 << 16; //~ ERROR: attempt to shift left with overflow
14 let n = 1u32 << 32; //~ ERROR: attempt to shift left with overflow
16 let n = 1u64 << 64; //~ ERROR: attempt to shift left with overflow
18 let n = 1i8 << 8; //~ ERROR: attempt to shift left with overflow
20 let n = 1i16 << 16; //~ ERROR: attempt to shift left with overflow
22 let n = 1i32 << 32; //~ ERROR: attempt to shift left with overflow
24 let n = 1i64 << 64; //~ ERROR: attempt to shift left with overflow
27 let n = 1u8 >> 8; //~ ERROR: attempt to shift right with overflow
29 let n = 1u16 >> 16; //~ ERROR: attempt to shift right with overflow
31 let n = 1u32 >> 32; //~ ERROR: attempt to shift right with overflow
33 let n = 1u64 >> 64; //~ ERROR: attempt to shift right with overflow
35 let n = 1i8 >> 8; //~ ERROR: attempt to shift right with overflow
37 let n = 1i16 >> 16; //~ ERROR: attempt to shift right with overflow
39 let n = 1i32 >> 32; //~ ERROR: attempt to shift right with overflow
41 let n = 1i64 >> 64; //~ ERROR: attempt to shift right with overflow
45 let n = n << 8; //~ ERROR: attempt to shift left with overflow
47 let n = 1u8 << -8; //~ ERROR: attempt to shift left with overflow
49 let n = 1i8<<(1isize+-1);