1 // ignore-compare-mode-nll
3 //[mir]compile-flags: -Z borrowck=compare
5 struct TrieMapIterator<'a> {
11 let _iter = TrieMapIterator{node: &a};
12 _iter.node = & //[ast]~ ERROR cannot assign to field `_iter.node` of immutable binding
13 //[mir]~^ ERROR cannot assign to field `_iter.node` of immutable binding (Ast)
14 // MIR doesn't generate an error because the code isn't reachable. This is OK
15 // because the test is here to check that the compiler doesn't ICE (cf. #5500).