diff options
| author | bors <bors@rust-lang.org> | 2025-09-09 15:04:44 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-09-09 15:04:44 +0000 |
| commit | 364da5d88d772fa40fb20353443595385443ac25 (patch) | |
| tree | caf020ac7532e45bbfcf8e0726fd6eecf7d7e9b8 /compiler/rustc_middle/src/ty/layout.rs | |
| parent | be8de5d6a0fc5cb2924e174a809a0aff303f281a (diff) | |
| parent | 8cde544b737892e12a757b1c0399781f44080730 (diff) | |
| download | rust-364da5d88d772fa40fb20353443595385443ac25.tar.gz rust-364da5d88d772fa40fb20353443595385443ac25.zip | |
Auto merge of #145717 - BoxyUwU:erase_regions_rename, r=lcnr
rename erase_regions to erase_and_anonymize_regions I find it consistently confusing that `erase_regions` does more than replacing regions with `'erased`. it also makes some code look real goofy to be writing manual folders to erase regions with a comment saying "we cant use erase regions" :> or code that re-calls erase_regions on types with regions already erased just to anonymize all the bound regions. r? lcnr idk how i feel about the name being almost twice as long now
Diffstat (limited to 'compiler/rustc_middle/src/ty/layout.rs')
| -rw-r--r-- | compiler/rustc_middle/src/ty/layout.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rustc_middle/src/ty/layout.rs b/compiler/rustc_middle/src/ty/layout.rs index aed94f9aa04..2114d080dfa 100644 --- a/compiler/rustc_middle/src/ty/layout.rs +++ b/compiler/rustc_middle/src/ty/layout.rs @@ -401,7 +401,10 @@ impl<'tcx> SizeSkeleton<'tcx> { match tail.kind() { ty::Param(_) | ty::Alias(ty::Projection | ty::Inherent, _) => { debug_assert!(tail.has_non_region_param()); - Ok(SizeSkeleton::Pointer { non_zero, tail: tcx.erase_regions(tail) }) + Ok(SizeSkeleton::Pointer { + non_zero, + tail: tcx.erase_and_anonymize_regions(tail), + }) } ty::Error(guar) => { // Fixes ICE #124031 |
