summaryrefslogtreecommitdiffstats
path: root/tests/ui/iterators/integral.rs
blob: 7537c7904c0bf7fe5849afb6ffa5803002f57b20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
fn main() {
    for _ in 42 {}
    //~^ ERROR `{integer}` is not an iterator
    for _ in 42 as u8 {}
    //~^ ERROR `u8` is not an iterator
    for _ in 42 as i8 {}
    //~^ ERROR `i8` is not an iterator
    for _ in 42 as u16 {}
    //~^ ERROR `u16` is not an iterator
    for _ in 42 as i16 {}
    //~^ ERROR `i16` is not an iterator
    for _ in 42 as u32 {}
    //~^ ERROR `u32` is not an iterator
    for _ in 42 as i32 {}
    //~^ ERROR `i32` is not an iterator
    for _ in 42 as u64 {}
    //~^ ERROR `u64` is not an iterator
    for _ in 42 as i64 {}
    //~^ ERROR `i64` is not an iterator
    for _ in 42 as usize {}
    //~^ ERROR `usize` is not an iterator
    for _ in 42 as isize {}
    //~^ ERROR `isize` is not an iterator
    for _ in 42.0 {}
    //~^ ERROR `{float}` is not an iterator
}