Skip to content

Commit 624c693

Browse files
committed
Remove check for projections in a branch without any
The else branch is taken when projection slice is empty so everything except for the call to the `visit_local` is a dead code.
1 parent 59b6583 commit 624c693

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

compiler/rustc_codegen_ssa/src/mir/analyze.rs

-13
Original file line numberDiff line numberDiff line change
@@ -157,20 +157,7 @@ impl<Bx: BuilderMethods<'a, 'tcx>> LocalAnalyzer<'mir, 'a, 'tcx, Bx> {
157157
);
158158
}
159159
} else {
160-
// FIXME this is super_place code, is repeated here to avoid cloning place or changing
161-
// visit_place API
162-
let mut context = context;
163-
164-
if !place_ref.projection.is_empty() {
165-
context = if context.is_mutating_use() {
166-
PlaceContext::MutatingUse(MutatingUseContext::Projection)
167-
} else {
168-
PlaceContext::NonMutatingUse(NonMutatingUseContext::Projection)
169-
};
170-
}
171-
172160
self.visit_local(&place_ref.local, context, location);
173-
self.visit_projection(*place_ref, context, location);
174161
}
175162
}
176163
}

0 commit comments

Comments
 (0)