rollup merge of #18580 : hirschenberger/issue-17713
This commit is contained in:
commit
11790a545c
2 changed files with 40 additions and 40 deletions
|
|
@ -12,47 +12,47 @@
|
|||
#![allow(unused_variables)]
|
||||
|
||||
fn main() {
|
||||
let n = 1u8 << 8;
|
||||
let n = 1u8 << 9; //~ ERROR: bitshift exceeds the type's number of bits
|
||||
let n = 1u16 << 16;
|
||||
let n = 1u16 << 17; //~ ERROR: bitshift exceeds the type's number of bits
|
||||
let n = 1u32 << 32;
|
||||
let n = 1u32 << 33; //~ ERROR: bitshift exceeds the type's number of bits
|
||||
let n = 1u64 << 64;
|
||||
let n = 1u64 << 65; //~ ERROR: bitshift exceeds the type's number of bits
|
||||
let n = 1i8 << 8;
|
||||
let n = 1i8 << 9; //~ ERROR: bitshift exceeds the type's number of bits
|
||||
let n = 1i16 << 16;
|
||||
let n = 1i16 << 17; //~ ERROR: bitshift exceeds the type's number of bits
|
||||
let n = 1i32 << 32;
|
||||
let n = 1i32 << 33; //~ ERROR: bitshift exceeds the type's number of bits
|
||||
let n = 1i64 << 64;
|
||||
let n = 1i64 << 65; //~ ERROR: bitshift exceeds the type's number of bits
|
||||
let n = 1u8 << 7;
|
||||
let n = 1u8 << 8; //~ ERROR: bitshift exceeds the type's number of bits
|
||||
let n = 1u16 << 15;
|
||||
let n = 1u16 << 16; //~ ERROR: bitshift exceeds the type's number of bits
|
||||
let n = 1u32 << 31;
|
||||
let n = 1u32 << 32; //~ ERROR: bitshift exceeds the type's number of bits
|
||||
let n = 1u64 << 63;
|
||||
let n = 1u64 << 64; //~ ERROR: bitshift exceeds the type's number of bits
|
||||
let n = 1i8 << 7;
|
||||
let n = 1i8 << 8; //~ ERROR: bitshift exceeds the type's number of bits
|
||||
let n = 1i16 << 15;
|
||||
let n = 1i16 << 16; //~ ERROR: bitshift exceeds the type's number of bits
|
||||
let n = 1i32 << 31;
|
||||
let n = 1i32 << 32; //~ ERROR: bitshift exceeds the type's number of bits
|
||||
let n = 1i64 << 63;
|
||||
let n = 1i64 << 64; //~ ERROR: bitshift exceeds the type's number of bits
|
||||
|
||||
let n = 1u8 >> 8;
|
||||
let n = 1u8 >> 9; //~ ERROR: bitshift exceeds the type's number of bits
|
||||
let n = 1u16 >> 16;
|
||||
let n = 1u16 >> 17; //~ ERROR: bitshift exceeds the type's number of bits
|
||||
let n = 1u32 >> 32;
|
||||
let n = 1u32 >> 33; //~ ERROR: bitshift exceeds the type's number of bits
|
||||
let n = 1u64 >> 64;
|
||||
let n = 1u64 >> 65; //~ ERROR: bitshift exceeds the type's number of bits
|
||||
let n = 1i8 >> 8;
|
||||
let n = 1i8 >> 9; //~ ERROR: bitshift exceeds the type's number of bits
|
||||
let n = 1i16 >> 16;
|
||||
let n = 1i16 >> 17; //~ ERROR: bitshift exceeds the type's number of bits
|
||||
let n = 1i32 >> 32;
|
||||
let n = 1i32 >> 33; //~ ERROR: bitshift exceeds the type's number of bits
|
||||
let n = 1i64 >> 64;
|
||||
let n = 1i64 >> 65; //~ ERROR: bitshift exceeds the type's number of bits
|
||||
let n = 1u8 >> 7;
|
||||
let n = 1u8 >> 8; //~ ERROR: bitshift exceeds the type's number of bits
|
||||
let n = 1u16 >> 15;
|
||||
let n = 1u16 >> 16; //~ ERROR: bitshift exceeds the type's number of bits
|
||||
let n = 1u32 >> 31;
|
||||
let n = 1u32 >> 32; //~ ERROR: bitshift exceeds the type's number of bits
|
||||
let n = 1u64 >> 63;
|
||||
let n = 1u64 >> 64; //~ ERROR: bitshift exceeds the type's number of bits
|
||||
let n = 1i8 >> 7;
|
||||
let n = 1i8 >> 8; //~ ERROR: bitshift exceeds the type's number of bits
|
||||
let n = 1i16 >> 15;
|
||||
let n = 1i16 >> 16; //~ ERROR: bitshift exceeds the type's number of bits
|
||||
let n = 1i32 >> 31;
|
||||
let n = 1i32 >> 32; //~ ERROR: bitshift exceeds the type's number of bits
|
||||
let n = 1i64 >> 63;
|
||||
let n = 1i64 >> 64; //~ ERROR: bitshift exceeds the type's number of bits
|
||||
|
||||
let n = 1u8;
|
||||
let n = n << 8;
|
||||
let n = n << 9; //~ ERROR: bitshift exceeds the type's number of bits
|
||||
let n = n << 7;
|
||||
let n = n << 8; //~ ERROR: bitshift exceeds the type's number of bits
|
||||
|
||||
let n = 1u8 << -9; //~ ERROR: bitshift exceeds the type's number of bits
|
||||
let n = 1u8 << -8; //~ ERROR: bitshift exceeds the type's number of bits
|
||||
|
||||
let n = 1u8 << (4+4);
|
||||
let n = 1u8 << (4+5); //~ ERROR: bitshift exceeds the type's number of bits
|
||||
let n = 1u8 << (4+3);
|
||||
let n = 1u8 << (4+4); //~ ERROR: bitshift exceeds the type's number of bits
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue