Skip to content

Commit 37f42e0

Browse files
Intern TypingMode 💀
1 parent 9b33e63 commit 37f42e0

File tree

130 files changed

+521
-418
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

130 files changed

+521
-418
lines changed

compiler/rustc_codegen_cranelift/src/abi/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ pub(crate) fn codegen_terminator_call<'tcx>(
394394
let instance = if let ty::FnDef(def_id, fn_args) = *func.layout().ty.kind() {
395395
let instance = ty::Instance::expect_resolve(
396396
fx.tcx,
397-
ty::TypingEnv::fully_monomorphized(),
397+
ty::TypingEnv::fully_monomorphized(fx.tcx),
398398
def_id,
399399
fn_args,
400400
source_info.span,

compiler/rustc_codegen_cranelift/src/base.rs

+6-4
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,7 @@ fn codegen_stmt<'tcx>(
679679
let func_ref = fx.get_function_ref(
680680
Instance::resolve_for_fn_ptr(
681681
fx.tcx,
682-
ty::TypingEnv::fully_monomorphized(),
682+
ty::TypingEnv::fully_monomorphized(fx.tcx),
683683
def_id,
684684
args,
685685
)
@@ -730,8 +730,10 @@ fn codegen_stmt<'tcx>(
730730

731731
fn is_wide_ptr<'tcx>(fx: &FunctionCx<'_, '_, 'tcx>, ty: Ty<'tcx>) -> bool {
732732
ty.builtin_deref(true).is_some_and(|pointee_ty| {
733-
fx.tcx
734-
.type_has_metadata(pointee_ty, ty::TypingEnv::fully_monomorphized())
733+
fx.tcx.type_has_metadata(
734+
pointee_ty,
735+
ty::TypingEnv::fully_monomorphized(fx.tcx),
736+
)
735737
})
736738
}
737739

@@ -862,7 +864,7 @@ fn codegen_stmt<'tcx>(
862864
NullOp::OffsetOf(fields) => fx
863865
.tcx
864866
.offset_of_subfield(
865-
ty::TypingEnv::fully_monomorphized(),
867+
ty::TypingEnv::fully_monomorphized(fx.tcx),
866868
layout,
867869
fields.iter(),
868870
)

compiler/rustc_codegen_cranelift/src/common.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ fn clif_type_from_ty<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>) -> Option<types::Typ
7171
},
7272
ty::FnPtr(..) => pointer_ty(tcx),
7373
ty::RawPtr(pointee_ty, _) | ty::Ref(_, pointee_ty, _) => {
74-
if tcx.type_has_metadata(*pointee_ty, ty::TypingEnv::fully_monomorphized()) {
74+
if tcx.type_has_metadata(*pointee_ty, ty::TypingEnv::fully_monomorphized(tcx)) {
7575
return None;
7676
} else {
7777
pointer_ty(tcx)
@@ -91,7 +91,7 @@ fn clif_pair_type_from_ty<'tcx>(
9191
(clif_type_from_ty(tcx, types[0])?, clif_type_from_ty(tcx, types[1])?)
9292
}
9393
ty::RawPtr(pointee_ty, _) | ty::Ref(_, pointee_ty, _) => {
94-
if tcx.type_has_metadata(*pointee_ty, ty::TypingEnv::fully_monomorphized()) {
94+
if tcx.type_has_metadata(*pointee_ty, ty::TypingEnv::fully_monomorphized(tcx)) {
9595
(pointer_ty(tcx), pointer_ty(tcx))
9696
} else {
9797
return None;
@@ -327,7 +327,7 @@ impl<'tcx> rustc_abi::HasDataLayout for FunctionCx<'_, '_, 'tcx> {
327327

328328
impl<'tcx> layout::HasTypingEnv<'tcx> for FunctionCx<'_, '_, 'tcx> {
329329
fn typing_env(&self) -> ty::TypingEnv<'tcx> {
330-
ty::TypingEnv::fully_monomorphized()
330+
ty::TypingEnv::fully_monomorphized(self.tcx)
331331
}
332332
}
333333

@@ -344,7 +344,7 @@ impl<'tcx> FunctionCx<'_, '_, 'tcx> {
344344
{
345345
self.instance.instantiate_mir_and_normalize_erasing_regions(
346346
self.tcx,
347-
ty::TypingEnv::fully_monomorphized(),
347+
ty::TypingEnv::fully_monomorphized(self.tcx),
348348
ty::EarlyBinder::bind(value),
349349
)
350350
}
@@ -490,7 +490,7 @@ impl<'tcx> rustc_abi::HasDataLayout for FullyMonomorphizedLayoutCx<'tcx> {
490490

491491
impl<'tcx> layout::HasTypingEnv<'tcx> for FullyMonomorphizedLayoutCx<'tcx> {
492492
fn typing_env(&self) -> ty::TypingEnv<'tcx> {
493-
ty::TypingEnv::fully_monomorphized()
493+
ty::TypingEnv::fully_monomorphized(self.0)
494494
}
495495
}
496496

compiler/rustc_codegen_cranelift/src/constant.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ pub(crate) fn eval_mir_constant<'tcx>(
7878
let cv = fx.monomorphize(constant.const_);
7979
// This cannot fail because we checked all required_consts in advance.
8080
let val = cv
81-
.eval(fx.tcx, ty::TypingEnv::fully_monomorphized(), constant.span)
81+
.eval(fx.tcx, ty::TypingEnv::fully_monomorphized(fx.tcx), constant.span)
8282
.expect("erroneous constant missed by mono item collection");
8383
(val, cv.ty())
8484
}
@@ -267,9 +267,9 @@ fn data_id_for_static(
267267
assert!(!definition);
268268
assert!(!tcx.is_mutable_static(def_id));
269269

270-
let ty = instance.ty(tcx, ty::TypingEnv::fully_monomorphized());
270+
let ty = instance.ty(tcx, ty::TypingEnv::fully_monomorphized(tcx));
271271
let align = tcx
272-
.layout_of(ty::TypingEnv::fully_monomorphized().as_query_input(ty))
272+
.layout_of(ty::TypingEnv::fully_monomorphized(tcx).as_query_input(ty))
273273
.unwrap()
274274
.align
275275
.abi

compiler/rustc_codegen_cranelift/src/debuginfo/mod.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ impl DebugContext {
210210

211211
type_names::push_generic_params(
212212
tcx,
213-
tcx.normalize_erasing_regions(ty::TypingEnv::fully_monomorphized(), args),
213+
tcx.normalize_erasing_regions(ty::TypingEnv::fully_monomorphized(tcx), args),
214214
&mut name,
215215
);
216216

@@ -275,9 +275,10 @@ impl DebugContext {
275275
let span = tcx.def_span(def_id);
276276
let (file_id, line, _column) = self.get_span_loc(tcx, span, span);
277277

278-
let static_type = Instance::mono(tcx, def_id).ty(tcx, ty::TypingEnv::fully_monomorphized());
278+
let static_type =
279+
Instance::mono(tcx, def_id).ty(tcx, ty::TypingEnv::fully_monomorphized(tcx));
279280
let static_layout = tcx
280-
.layout_of(ty::TypingEnv::fully_monomorphized().as_query_input(static_type))
281+
.layout_of(ty::TypingEnv::fully_monomorphized(tcx).as_query_input(static_type))
281282
.unwrap();
282283
// FIXME use the actual type layout
283284
let type_id = self.debug_type(tcx, type_dbg, static_type);

compiler/rustc_codegen_cranelift/src/debuginfo/types.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ impl DebugContext {
129129

130130
let name = type_names::compute_debuginfo_type_name(tcx, ptr_type, true);
131131

132-
if !tcx.type_has_metadata(ptr_type, ty::TypingEnv::fully_monomorphized()) {
132+
if !tcx.type_has_metadata(ptr_type, ty::TypingEnv::fully_monomorphized(tcx)) {
133133
let pointer_type_id =
134134
self.dwarf.unit.add(self.dwarf.unit.root(), gimli::DW_TAG_pointer_type);
135135
let pointer_entry = self.dwarf.unit.get_mut(pointer_type_id);

compiler/rustc_codegen_cranelift/src/inline_asm.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ pub(crate) fn codegen_inline_asm_terminator<'tcx>(
9292
if let ty::FnDef(def_id, args) = *const_.ty().kind() {
9393
let instance = ty::Instance::resolve_for_fn_ptr(
9494
fx.tcx,
95-
ty::TypingEnv::fully_monomorphized(),
95+
ty::TypingEnv::fully_monomorphized(fx.tcx),
9696
def_id,
9797
args,
9898
)
@@ -225,11 +225,11 @@ pub(crate) fn codegen_naked_asm<'tcx>(
225225
InlineAsmOperand::Const { ref value } => {
226226
let cv = instance.instantiate_mir_and_normalize_erasing_regions(
227227
tcx,
228-
ty::TypingEnv::fully_monomorphized(),
228+
ty::TypingEnv::fully_monomorphized(tcx),
229229
ty::EarlyBinder::bind(value.const_),
230230
);
231231
let const_value = cv
232-
.eval(tcx, ty::TypingEnv::fully_monomorphized(), value.span)
232+
.eval(tcx, ty::TypingEnv::fully_monomorphized(tcx), value.span)
233233
.expect("erroneous constant missed by mono item collection");
234234

235235
let value = rustc_codegen_ssa::common::asm_const_to_str(
@@ -248,13 +248,13 @@ pub(crate) fn codegen_naked_asm<'tcx>(
248248

249249
let const_ = instance.instantiate_mir_and_normalize_erasing_regions(
250250
tcx,
251-
ty::TypingEnv::fully_monomorphized(),
251+
ty::TypingEnv::fully_monomorphized(tcx),
252252
ty::EarlyBinder::bind(value.const_),
253253
);
254254
if let ty::FnDef(def_id, args) = *const_.ty().kind() {
255255
let instance = ty::Instance::resolve_for_fn_ptr(
256256
tcx,
257-
ty::TypingEnv::fully_monomorphized(),
257+
ty::TypingEnv::fully_monomorphized(tcx),
258258
def_id,
259259
args,
260260
)

compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ fn codegen_regular_intrinsic_call<'tcx>(
682682
.tcx
683683
.check_validity_requirement((
684684
requirement,
685-
ty::TypingEnv::fully_monomorphized().as_query_input(ty),
685+
ty::TypingEnv::fully_monomorphized(fx.tcx).as_query_input(ty),
686686
))
687687
.expect("expect to have layout during codegen");
688688

@@ -743,7 +743,7 @@ fn codegen_regular_intrinsic_call<'tcx>(
743743
let const_val = fx
744744
.tcx
745745
.const_eval_instance(
746-
ty::TypingEnv::fully_monomorphized(),
746+
ty::TypingEnv::fully_monomorphized(fx.tcx),
747747
instance,
748748
source_info.span,
749749
)

compiler/rustc_codegen_cranelift/src/main_shim.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ pub(crate) fn maybe_create_entry_wrapper(
4949
// regions must appear in the argument
5050
// listing.
5151
let main_ret_ty = tcx.normalize_erasing_regions(
52-
ty::TypingEnv::fully_monomorphized(),
52+
ty::TypingEnv::fully_monomorphized(tcx),
5353
main_ret_ty.no_bound_vars().unwrap(),
5454
);
5555

@@ -113,7 +113,7 @@ pub(crate) fn maybe_create_entry_wrapper(
113113
.unwrap();
114114
let report = Instance::expect_resolve(
115115
tcx,
116-
ty::TypingEnv::fully_monomorphized(),
116+
ty::TypingEnv::fully_monomorphized(tcx),
117117
report.def_id,
118118
tcx.mk_args(&[GenericArg::from(main_ret_ty)]),
119119
DUMMY_SP,
@@ -139,7 +139,7 @@ pub(crate) fn maybe_create_entry_wrapper(
139139
let start_def_id = tcx.require_lang_item(LangItem::Start, None);
140140
let start_instance = Instance::expect_resolve(
141141
tcx,
142-
ty::TypingEnv::fully_monomorphized(),
142+
ty::TypingEnv::fully_monomorphized(tcx),
143143
start_def_id,
144144
tcx.mk_args(&[main_ret_ty.into()]),
145145
DUMMY_SP,

compiler/rustc_codegen_cranelift/src/num.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ pub(crate) fn codegen_ptr_binop<'tcx>(
399399
.layout()
400400
.ty
401401
.builtin_deref(true)
402-
.map(|ty| !fx.tcx.type_has_metadata(ty, ty::TypingEnv::fully_monomorphized()))
402+
.map(|ty| !fx.tcx.type_has_metadata(ty, ty::TypingEnv::fully_monomorphized(fx.tcx)))
403403
.unwrap_or(true);
404404

405405
if is_thin_ptr {

compiler/rustc_codegen_cranelift/src/value_and_place.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,7 @@ impl<'tcx> CPlace<'tcx> {
746746
};
747747

748748
let (field_ptr, field_layout) = codegen_field(fx, base, extra, layout, field);
749-
if fx.tcx.type_has_metadata(field_layout.ty, ty::TypingEnv::fully_monomorphized()) {
749+
if fx.tcx.type_has_metadata(field_layout.ty, ty::TypingEnv::fully_monomorphized(fx.tcx)) {
750750
CPlace::for_ptr_with_extra(field_ptr, extra.unwrap(), field_layout)
751751
} else {
752752
CPlace::for_ptr(field_ptr, field_layout)
@@ -832,7 +832,7 @@ impl<'tcx> CPlace<'tcx> {
832832

833833
pub(crate) fn place_deref(self, fx: &mut FunctionCx<'_, '_, 'tcx>) -> CPlace<'tcx> {
834834
let inner_layout = fx.layout_of(self.layout().ty.builtin_deref(true).unwrap());
835-
if fx.tcx.type_has_metadata(inner_layout.ty, ty::TypingEnv::fully_monomorphized()) {
835+
if fx.tcx.type_has_metadata(inner_layout.ty, ty::TypingEnv::fully_monomorphized(fx.tcx)) {
836836
let (addr, extra) = self.to_cvalue(fx).load_scalar_pair(fx);
837837
CPlace::for_ptr_with_extra(Pointer::new(addr), extra, inner_layout)
838838
} else {
@@ -845,7 +845,7 @@ impl<'tcx> CPlace<'tcx> {
845845
fx: &mut FunctionCx<'_, '_, 'tcx>,
846846
layout: TyAndLayout<'tcx>,
847847
) -> CValue<'tcx> {
848-
if fx.tcx.type_has_metadata(self.layout().ty, ty::TypingEnv::fully_monomorphized()) {
848+
if fx.tcx.type_has_metadata(self.layout().ty, ty::TypingEnv::fully_monomorphized(fx.tcx)) {
849849
let (ptr, extra) = self.to_ptr_unsized();
850850
CValue::by_val_pair(ptr.get_addr(fx), extra, layout)
851851
} else {

compiler/rustc_codegen_gcc/src/consts.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> {
215215
let gcc_type = if nested {
216216
self.type_i8()
217217
} else {
218-
let ty = instance.ty(self.tcx, ty::TypingEnv::fully_monomorphized());
218+
let ty = instance.ty(self.tcx, ty::TypingEnv::fully_monomorphized(self.tcx));
219219
self.layout_of(ty).gcc_type(self)
220220
};
221221

compiler/rustc_codegen_gcc/src/context.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> {
145145
) -> Self {
146146
let create_type = |ctype, rust_type| {
147147
let layout = tcx
148-
.layout_of(ty::TypingEnv::fully_monomorphized().as_query_input(rust_type))
148+
.layout_of(ty::TypingEnv::fully_monomorphized(tcx).as_query_input(rust_type))
149149
.unwrap();
150150
let align = layout.align.abi.bytes();
151151
#[cfg(feature = "master")]
@@ -590,7 +590,7 @@ impl<'gcc, 'tcx> FnAbiOfHelpers<'tcx> for CodegenCx<'gcc, 'tcx> {
590590

591591
impl<'tcx, 'gcc> HasTypingEnv<'tcx> for CodegenCx<'gcc, 'tcx> {
592592
fn typing_env(&self) -> ty::TypingEnv<'tcx> {
593-
ty::TypingEnv::fully_monomorphized()
593+
ty::TypingEnv::fully_monomorphized(self.tcx)
594594
}
595595
}
596596

compiler/rustc_codegen_gcc/src/int.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ impl<'a, 'gcc, 'tcx> Builder<'a, 'gcc, 'tcx> {
388388
};
389389
let layout = self
390390
.tcx
391-
.layout_of(ty::TypingEnv::fully_monomorphized().as_query_input(res_ty))
391+
.layout_of(ty::TypingEnv::fully_monomorphized(self.tcx).as_query_input(res_ty))
392392
.unwrap();
393393

394394
let arg_abi = ArgAbi { layout, mode: PassMode::Direct(ArgAttributes::new()) };

compiler/rustc_codegen_gcc/src/intrinsic/simd.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>(
5656

5757
let tcx = bx.tcx();
5858
let sig = tcx.normalize_erasing_late_bound_regions(
59-
ty::TypingEnv::fully_monomorphized(),
59+
ty::TypingEnv::fully_monomorphized(tcx),
6060
callee_ty.fn_sig(tcx),
6161
);
6262
let arg_tys = sig.inputs();
@@ -469,7 +469,7 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>(
469469
match *in_elem.kind() {
470470
ty::RawPtr(p_ty, _) => {
471471
let metadata = p_ty.ptr_metadata_ty(bx.tcx, |ty| {
472-
bx.tcx.normalize_erasing_regions(ty::TypingEnv::fully_monomorphized(), ty)
472+
bx.tcx.normalize_erasing_regions(ty::TypingEnv::fully_monomorphized(tcx), ty)
473473
});
474474
require!(
475475
metadata.is_unit(),
@@ -483,7 +483,7 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>(
483483
match *out_elem.kind() {
484484
ty::RawPtr(p_ty, _) => {
485485
let metadata = p_ty.ptr_metadata_ty(bx.tcx, |ty| {
486-
bx.tcx.normalize_erasing_regions(ty::TypingEnv::fully_monomorphized(), ty)
486+
bx.tcx.normalize_erasing_regions(ty::TypingEnv::fully_monomorphized(tcx), ty)
487487
});
488488
require!(
489489
metadata.is_unit(),

compiler/rustc_codegen_llvm/src/context.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1288,7 +1288,7 @@ impl<'tcx> ty::layout::HasTyCtxt<'tcx> for CodegenCx<'_, 'tcx> {
12881288

12891289
impl<'tcx, 'll> HasTypingEnv<'tcx> for CodegenCx<'ll, 'tcx> {
12901290
fn typing_env(&self) -> ty::TypingEnv<'tcx> {
1291-
ty::TypingEnv::fully_monomorphized()
1291+
ty::TypingEnv::fully_monomorphized(self.tcx)
12921292
}
12931293
}
12941294

compiler/rustc_codegen_llvm/src/debuginfo/metadata/type_map.rs

+9-6
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ pub(super) enum UniqueTypeId<'tcx> {
4949

5050
impl<'tcx> UniqueTypeId<'tcx> {
5151
pub(crate) fn for_ty(tcx: TyCtxt<'tcx>, t: Ty<'tcx>) -> Self {
52-
assert_eq!(t, tcx.normalize_erasing_regions(ty::TypingEnv::fully_monomorphized(), t));
52+
assert_eq!(t, tcx.normalize_erasing_regions(ty::TypingEnv::fully_monomorphized(tcx), t));
5353
UniqueTypeId::Ty(t, private::HiddenZst)
5454
}
5555

5656
pub(crate) fn for_enum_variant_part(tcx: TyCtxt<'tcx>, enum_ty: Ty<'tcx>) -> Self {
5757
assert_eq!(
5858
enum_ty,
59-
tcx.normalize_erasing_regions(ty::TypingEnv::fully_monomorphized(), enum_ty)
59+
tcx.normalize_erasing_regions(ty::TypingEnv::fully_monomorphized(tcx), enum_ty)
6060
);
6161
UniqueTypeId::VariantPart(enum_ty, private::HiddenZst)
6262
}
@@ -68,7 +68,7 @@ impl<'tcx> UniqueTypeId<'tcx> {
6868
) -> Self {
6969
assert_eq!(
7070
enum_ty,
71-
tcx.normalize_erasing_regions(ty::TypingEnv::fully_monomorphized(), enum_ty)
71+
tcx.normalize_erasing_regions(ty::TypingEnv::fully_monomorphized(tcx), enum_ty)
7272
);
7373
UniqueTypeId::VariantStructType(enum_ty, variant_idx, private::HiddenZst)
7474
}
@@ -80,7 +80,7 @@ impl<'tcx> UniqueTypeId<'tcx> {
8080
) -> Self {
8181
assert_eq!(
8282
enum_ty,
83-
tcx.normalize_erasing_regions(ty::TypingEnv::fully_monomorphized(), enum_ty)
83+
tcx.normalize_erasing_regions(ty::TypingEnv::fully_monomorphized(tcx), enum_ty)
8484
);
8585
UniqueTypeId::VariantStructTypeCppLikeWrapper(enum_ty, variant_idx, private::HiddenZst)
8686
}
@@ -92,11 +92,14 @@ impl<'tcx> UniqueTypeId<'tcx> {
9292
) -> Self {
9393
assert_eq!(
9494
self_type,
95-
tcx.normalize_erasing_regions(ty::TypingEnv::fully_monomorphized(), self_type)
95+
tcx.normalize_erasing_regions(ty::TypingEnv::fully_monomorphized(tcx), self_type)
9696
);
9797
assert_eq!(
9898
implemented_trait,
99-
tcx.normalize_erasing_regions(ty::TypingEnv::fully_monomorphized(), implemented_trait)
99+
tcx.normalize_erasing_regions(
100+
ty::TypingEnv::fully_monomorphized(tcx),
101+
implemented_trait
102+
)
100103
);
101104
UniqueTypeId::VTableTy(self_type, implemented_trait, private::HiddenZst)
102105
}

compiler/rustc_codegen_ssa/src/back/symbol_export.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ fn calling_convention_for_symbol<'tcx>(
613613
instance
614614
.map(|i| {
615615
tcx.fn_abi_of_instance(
616-
ty::TypingEnv::fully_monomorphized().as_query_input((i, ty::List::empty())),
616+
ty::TypingEnv::fully_monomorphized(tcx).as_query_input((i, ty::List::empty())),
617617
)
618618
.unwrap_or_else(|_| bug!("fn_abi_of_instance({i:?}) failed"))
619619
})

compiler/rustc_codegen_ssa/src/base.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ pub fn validate_trivial_unsize<'tcx>(
122122
match (source_data.principal(), target_data.principal()) {
123123
(Some(hr_source_principal), Some(hr_target_principal)) => {
124124
let (infcx, param_env) =
125-
tcx.infer_ctxt().build_with_typing_env(ty::TypingEnv::fully_monomorphized());
125+
tcx.infer_ctxt().build_with_typing_env(ty::TypingEnv::fully_monomorphized(tcx));
126126
let universe = infcx.universe();
127127
let ocx = ObligationCtxt::new(&infcx);
128128
infcx.enter_forall(hr_target_principal, |target_principal| {

0 commit comments

Comments
 (0)