summary refs log tree commit diff
path: root/src/test/ui/issues/issue-51116.rs
blob: c0a74a679efd1be2914d1cacddce408261e372a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
fn main() {
    let tiles = Default::default();
    for row in &mut tiles {
        for tile in row {
            //~^ NOTE the element type for this iterator is not specified
            *tile = 0;
            //~^ ERROR type annotations needed
            //~| NOTE cannot infer type
            //~| NOTE type must be known at this point
        }
    }

    let tiles: [[usize; 3]; 3] = tiles;
}