Rollup merge of #151902 - RalfJung:place-ty-opt, r=Kobzol

explain why we dont skip some of this work when there are field projections

Perf says it doesn't help 🤷
This commit is contained in:
Jonathan Brouwer 2026-02-02 18:52:15 +01:00 committed by GitHub
commit 382c889ba4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)
}