diff options
| author | bors <bors@rust-lang.org> | 2023-02-18 00:20:52 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-02-18 00:20:52 +0000 |
| commit | a9842c73bcd78ca4c2ec56f3e529aed79bd37df7 (patch) | |
| tree | d643279e187292a87bc8e7d78edb212c714e8fa0 /compiler/rustc_const_eval/src | |
| parent | 231bcd131d109d41e5705f48b9c5a6e70c98ff80 (diff) | |
| parent | af32411f20d4e4f79a2c8b4b645b2693a46c3d7d (diff) | |
| download | rust-a9842c73bcd78ca4c2ec56f3e529aed79bd37df7.tar.gz rust-a9842c73bcd78ca4c2ec56f3e529aed79bd37df7.zip | |
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`
Diffstat (limited to 'compiler/rustc_const_eval/src')
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/intrinsics/caller_location.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/intrinsics/caller_location.rs b/compiler/rustc_const_eval/src/interpret/intrinsics/caller_location.rs index ec5707505c8..f6a3937870e 100644 --- a/compiler/rustc_const_eval/src/interpret/intrinsics/caller_location.rs +++ b/compiler/rustc_const_eval/src/interpret/intrinsics/caller_location.rs @@ -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(); |
