Auto merge of #108112 - nnethercote:clarify-iterator-interners, r=oli-obk,compiler-errors

Clarify iterator interners

I found the iterator interners very confusing. This PR clarifies things.

r? `@compiler-errors`
This commit is contained in:
bors 2023-02-18 00:20:52 +00:00
commit a9842c73bc
36 changed files with 173 additions and 186 deletions

View file

@ -96,7 +96,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
let loc_ty = self
.tcx
.type_of(self.tcx.require_lang_item(LangItem::PanicLocation, None))
.subst(*self.tcx, self.tcx.mk_substs([self.tcx.lifetimes.re_erased.into()].iter()));
.subst(*self.tcx, self.tcx.intern_substs(&[self.tcx.lifetimes.re_erased.into()]));
let loc_layout = self.layout_of(loc_ty).unwrap();
let location = self.allocate(loc_layout, MemoryKind::CallerLocation).unwrap();