rollup merge of #18593 : hirschenberger/issue-18587

Conflicts:
	src/test/compile-fail/lint-exceeding-bitshifts.rs
This commit is contained in:
Alex Crichton 2014-11-03 15:56:59 -08:00
commit f2aa8c4187
2 changed files with 11 additions and 7 deletions

View file

@ -10,6 +10,7 @@
#![deny(exceeding_bitshifts)]
#![allow(unused_variables)]
#![allow(dead_code)]
fn main() {
let n = 1u8 << 7;
@ -54,5 +55,8 @@ fn main() {
let n = 1u8 << (4+3);
let n = 1u8 << (4+4); //~ ERROR: bitshift exceeds the type's number of bits
let n = 1i << std::int::BITS; //~ ERROR: bitshift exceeds the type's number of bits
let n = 1u << std::uint::BITS; //~ ERROR: bitshift exceeds the type's number of bits
}