Skip to content

Commit 1db8c41

Browse files
committed
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
2 parents 004a7d4 + 1b272ca commit 1db8c41

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/type_of.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ impl<'tcx> LayoutGccExt<'tcx> for TyAndLayout<'tcx> {
240240

241241
// Make sure lifetimes are erased, to avoid generating distinct LLVM
242242
// types for Rust types that only differ in the choice of lifetimes.
243-
let normal_ty = cx.tcx.erase_regions(self.ty);
243+
let normal_ty = cx.tcx.erase_and_anonymize_regions(self.ty);
244244

245245
let mut defer = None;
246246
let ty = if self.ty != normal_ty {

0 commit comments

Comments
 (0)