diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-5500-1.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-5500-1.rs b/src/test/ui/issues/issue-5500-1.rs new file mode 100644 index 000000000..98d6e1a14 --- /dev/null +++ b/src/test/ui/issues/issue-5500-1.rs @@ -0,0 +1,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!() +} |