From c725637dc24fbe47704e92b7e8a8875f60ccd2be Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Mon, 2 Feb 2026 11:22:33 +0100 Subject: [PATCH] explain why we dont skip some of this work when there are field projections --- compiler/rustc_middle/src/mir/statement.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/rustc_middle/src/mir/statement.rs b/compiler/rustc_middle/src/mir/statement.rs index 393e9c59c355..973ceccc67f9 100644 --- a/compiler/rustc_middle/src/mir/statement.rs +++ b/compiler/rustc_middle/src/mir/statement.rs @@ -441,6 +441,8 @@ impl<'tcx> Place<'tcx> { where D: ?Sized + HasLocalDecls<'tcx>, { + // If there's a field projection element in `projection`, we *could* skip everything + // before that, but on 2026-01-31 a perf experiment showed no benefit from doing so. PlaceTy::from_ty(local_decls.local_decls()[local].ty).multi_projection_ty(tcx, projection) }