summaryrefslogtreecommitdiff
path: root/tests/ui/over-constrained-vregs.rs
blob: 016a667e93785ca77fcda879f546a621c480d796 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
//@ run-pass

#![allow(unused_must_use)]
// Regression test for issue #152.
pub fn main() {
    let mut b: usize = 1_usize;
    while b < std::mem::size_of::<usize>() {
        0_usize << b;
        b <<= 1_usize;
        println!("{}", b);
    }
}