]> git.lizzy.rs Git - rust.git/blob - tests/ui/never_type/issue-5500-1.rs
Auto merge of #101138 - Rejyr:diagnostic-migration-rustc-lint-pt2, r=davidtwco
[rust.git] / tests / ui / never_type / issue-5500-1.rs
1 // MIR doesn't generate an error because the assignment isn't reachable. This
2 // is OK because the test is here to check that the compiler doesn't ICE (cf.
3 // #5500).
4
5 // check-pass
6
7 struct TrieMapIterator<'a> {
8     node: &'a usize
9 }
10
11 fn main() {
12     let a = 5;
13     let _iter = TrieMapIterator{node: &a};
14     _iter.node = &panic!()
15 }