about summary refs log tree commit diff
path: root/src/tools/clippy/tests/ui/crashes/ice-6250.rs
blob: 65cdce7931429d60a06e213001dc6ab3f3748645 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// originally from glacier/fixed/77218.rs
// ice while adjusting...
//@no-rustfix
pub struct Cache {
    data: Vec<i32>,
}

pub fn list_data(cache: &Cache, key: usize) {
    for reference in vec![1, 2, 3] {
        if
        /* let */
        Some(reference) = cache.data.get(key) {
            //~^ ERROR: mismatched types
            //~| ERROR: mismatched types
            unimplemented!()
        }
    }
}