summaryrefslogtreecommitdiffstats
path: root/tests/ui/never_type/issue-5500-1.rs
blob: 98d6e1a14cb3200f1ec6be9d161d003a509eb7e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// MIR doesn't generate an error because the assignment isn't reachable. This
// is OK because the test is here to check that the compiler doesn't ICE (cf.
// #5500).

// check-pass

struct TrieMapIterator<'a> {
    node: &'a usize
}

fn main() {
    let a = 5;
    let _iter = TrieMapIterator{node: &a};
    _iter.node = &panic!()
}