about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2024-10-08 11:17:27 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2024-11-04 17:36:25 +1100
commita07011bde22278fe557f9e2acd70374d070d582f (patch)
tree30dd723e51eda8e0f7ed799f9699abb6f313d783
parente23bdd68f989a34a150aaeba2eaec0062a11332f (diff)
downloadrust-a07011bde22278fe557f9e2acd70374d070d582f.tar.gz
rust-a07011bde22278fe557f9e2acd70374d070d582f.zip
Remove unnecessary `continue`.
-rw-r--r--compiler/rustc_borrowck/src/prefixes.rs3
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")