diff options
| author | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2021-06-03 00:00:00 +0000 |
|---|---|---|
| committer | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2021-06-03 16:29:38 +0200 |
| commit | 624c693508e94de2c962a4341d843313e5837511 (patch) | |
| tree | 9b3de9db004559c36e67f8009a95ed457f9e8b8a /compiler/rustc_codegen_ssa/src/mir | |
| parent | 59b6583287eb90598af98d916aaed617b148b4a3 (diff) | |
| download | rust-624c693508e94de2c962a4341d843313e5837511.tar.gz rust-624c693508e94de2c962a4341d843313e5837511.zip | |
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.
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/mir')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/mir/analyze.rs | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/compiler/rustc_codegen_ssa/src/mir/analyze.rs b/compiler/rustc_codegen_ssa/src/mir/analyze.rs index a5aa170dece..a040c3d7de1 100644 --- a/compiler/rustc_codegen_ssa/src/mir/analyze.rs +++ b/compiler/rustc_codegen_ssa/src/mir/analyze.rs @@ -157,20 +157,7 @@ impl<Bx: BuilderMethods<'a, 'tcx>> LocalAnalyzer<'mir, 'a, 'tcx, Bx> { ); } } else { - // FIXME this is super_place code, is repeated here to avoid cloning place or changing - // visit_place API - let mut context = context; - - if !place_ref.projection.is_empty() { - context = if context.is_mutating_use() { - PlaceContext::MutatingUse(MutatingUseContext::Projection) - } else { - PlaceContext::NonMutatingUse(NonMutatingUseContext::Projection) - }; - } - self.visit_local(&place_ref.local, context, location); - self.visit_projection(*place_ref, context, location); } } } |
