diff options
| -rw-r--r-- | compiler/rustc_borrowck/src/prefixes.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_borrowck/src/prefixes.rs b/compiler/rustc_borrowck/src/prefixes.rs index aeb8a6c014a..fc7e6e58641 100644 --- a/compiler/rustc_borrowck/src/prefixes.rs +++ b/compiler/rustc_borrowck/src/prefixes.rs @@ -53,7 +53,7 @@ impl<'tcx> Iterator for Prefixes<'tcx> { // may hold one further down (e.g., we never return // downcasts here, but may return a base of a downcast). - 'cursor: loop { + loop { match cursor.last_projection() { None => { self.next = None; @@ -72,7 +72,6 @@ impl<'tcx> Iterator for Prefixes<'tcx> { | ProjectionElem::ConstantIndex { .. } | ProjectionElem::Index(_) => { cursor = cursor_base; - continue 'cursor; } ProjectionElem::Subtype(..) => { panic!("Subtype projection is not allowed before borrow check") |
