Skip to content

Commit 9556b56

Browse files
committed
Auto merge of #107753 - kylematsuda:type-of, r=BoxyUwU
Switch to `EarlyBinder` for `type_of` query Part of the work to finish #105779 and implement rust-lang/types-team#78. Several queries `X` have a `bound_X` variant that wraps the output in `EarlyBinder`. This adds `EarlyBinder` to the return type of the `type_of` query and removes `bound_type_of`. r? `@lcnr`
2 parents ea21839 + f6c3469 commit 9556b56

File tree

164 files changed

+443
-334
lines changed

Some content is hidden

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

164 files changed

+443
-334
lines changed

compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2592,7 +2592,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
25922592
if is_closure {
25932593
None
25942594
} else {
2595-
let ty = self.infcx.tcx.type_of(self.mir_def_id());
2595+
let ty = self.infcx.tcx.type_of(self.mir_def_id()).subst_identity();
25962596
match ty.kind() {
25972597
ty::FnDef(_, _) | ty::FnPtr(_) => self.annotate_fn_sig(
25982598
self.mir_def_id(),

compiler/rustc_borrowck/src/diagnostics/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1185,7 +1185,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
11851185
let parent_self_ty =
11861186
matches!(tcx.def_kind(parent_did), rustc_hir::def::DefKind::Impl { .. })
11871187
.then_some(parent_did)
1188-
.and_then(|did| match tcx.type_of(did).kind() {
1188+
.and_then(|did| match tcx.type_of(did).subst_identity().kind() {
11891189
ty::Adt(def, ..) => Some(def.did()),
11901190
_ => None,
11911191
});

compiler/rustc_borrowck/src/diagnostics/region_errors.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
575575

576576
let mut output_ty = self.regioncx.universal_regions().unnormalized_output_ty;
577577
if let ty::Alias(ty::Opaque, ty::AliasTy { def_id, .. }) = *output_ty.kind() {
578-
output_ty = self.infcx.tcx.type_of(def_id)
578+
output_ty = self.infcx.tcx.type_of(def_id).subst_identity()
579579
};
580580

581581
debug!("report_fnmut_error: output_ty={:?}", output_ty);
@@ -896,7 +896,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
896896
debug!(?fn_did, ?substs);
897897

898898
// Only suggest this on function calls, not closures
899-
let ty = tcx.type_of(fn_did);
899+
let ty = tcx.type_of(fn_did).subst_identity();
900900
debug!("ty: {:?}, ty.kind: {:?}", ty, ty.kind());
901901
if let ty::Closure(_, _) = ty.kind() {
902902
return;

compiler/rustc_borrowck/src/diagnostics/region_name.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -849,8 +849,9 @@ impl<'tcx> MirBorrowckCtxt<'_, 'tcx> {
849849
return None;
850850
};
851851

852-
let found = tcx
853-
.any_free_region_meets(&tcx.type_of(region_parent), |r| *r == ty::ReEarlyBound(region));
852+
let found = tcx.any_free_region_meets(&tcx.type_of(region_parent).subst_identity(), |r| {
853+
*r == ty::ReEarlyBound(region)
854+
});
854855

855856
Some(RegionName {
856857
name: self.synthesize_region_name(),

compiler/rustc_borrowck/src/type_check/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ impl<'a, 'b, 'tcx> Visitor<'tcx> for TypeVerifier<'a, 'b, 'tcx> {
402402
);
403403
}
404404
} else if let Some(static_def_id) = constant.check_static_ptr(tcx) {
405-
let unnormalized_ty = tcx.type_of(static_def_id);
405+
let unnormalized_ty = tcx.type_of(static_def_id).subst_identity();
406406
let normalized_ty = self.cx.normalize(unnormalized_ty, locations);
407407
let literal_ty = constant.literal.ty().builtin_deref(true).unwrap().ty;
408408

compiler/rustc_borrowck/src/universal_regions.rs

+4-7
Original file line numberDiff line numberDiff line change
@@ -482,11 +482,8 @@ impl<'cx, 'tcx> UniversalRegionsBuilder<'cx, 'tcx> {
482482
);
483483
let region =
484484
self.infcx.tcx.mk_re_var(self.infcx.next_nll_region_var(FR).to_region_vid());
485-
let va_list_ty = self
486-
.infcx
487-
.tcx
488-
.bound_type_of(va_list_did)
489-
.subst(self.infcx.tcx, &[region.into()]);
485+
let va_list_ty =
486+
self.infcx.tcx.type_of(va_list_did).subst(self.infcx.tcx, &[region.into()]);
490487

491488
unnormalized_input_tys = self.infcx.tcx.mk_type_list(
492489
unnormalized_input_tys.iter().copied().chain(iter::once(va_list_ty)),
@@ -529,7 +526,7 @@ impl<'cx, 'tcx> UniversalRegionsBuilder<'cx, 'tcx> {
529526
match tcx.hir().body_owner_kind(self.mir_def.did) {
530527
BodyOwnerKind::Closure | BodyOwnerKind::Fn => {
531528
let defining_ty = if self.mir_def.did.to_def_id() == typeck_root_def_id {
532-
tcx.type_of(typeck_root_def_id)
529+
tcx.type_of(typeck_root_def_id).subst_identity()
533530
} else {
534531
let tables = tcx.typeck(self.mir_def.did);
535532
tables.node_type(self.mir_hir_id)
@@ -675,7 +672,7 @@ impl<'cx, 'tcx> UniversalRegionsBuilder<'cx, 'tcx> {
675672
// For a constant body, there are no inputs, and one
676673
// "output" (the type of the constant).
677674
assert_eq!(self.mir_def.did.to_def_id(), def_id);
678-
let ty = tcx.type_of(self.mir_def.def_id_for_type_of());
675+
let ty = tcx.type_of(self.mir_def.def_id_for_type_of()).subst_identity();
679676
let ty = indices.fold_to_region_vids(tcx, ty);
680677
ty::Binder::dummy(tcx.intern_type_list(&[ty]))
681678
}

compiler/rustc_codegen_llvm/src/debuginfo/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ impl<'ll, 'tcx> DebugInfoMethods<'tcx> for CodegenCx<'ll, 'tcx> {
508508
let impl_self_ty = cx.tcx.subst_and_normalize_erasing_regions(
509509
instance.substs,
510510
ty::ParamEnv::reveal_all(),
511-
cx.tcx.type_of(impl_def_id),
511+
cx.tcx.type_of(impl_def_id).skip_binder(),
512512
);
513513

514514
// Only "class" methods are generally understood by LLVM,

compiler/rustc_const_eval/src/interpret/intrinsics/caller_location.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
9595
// Allocate memory for `CallerLocation` struct.
9696
let loc_ty = self
9797
.tcx
98-
.bound_type_of(self.tcx.require_lang_item(LangItem::PanicLocation, None))
98+
.type_of(self.tcx.require_lang_item(LangItem::PanicLocation, None))
9999
.subst(*self.tcx, self.tcx.mk_substs([self.tcx.lifetimes.re_erased.into()].iter()));
100100
let loc_layout = self.layout_of(loc_ty).unwrap();
101101
let location = self.allocate(loc_layout, MemoryKind::CallerLocation).unwrap();

compiler/rustc_const_eval/src/interpret/memory.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,11 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
690690
assert!(self.tcx.is_static(def_id));
691691
assert!(!self.tcx.is_thread_local_static(def_id));
692692
// Use size and align of the type.
693-
let ty = self.tcx.type_of(def_id);
693+
let ty = self
694+
.tcx
695+
.type_of(def_id)
696+
.no_bound_vars()
697+
.expect("statics should not have generic parameters");
694698
let layout = self.tcx.layout_of(ParamEnv::empty().and(ty)).unwrap();
695699
assert!(layout.is_sized());
696700
(layout.size, layout.align.abi, AllocKind::LiveData)

compiler/rustc_const_eval/src/transform/check_consts/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ impl<'mir, 'tcx> ConstCx<'mir, 'tcx> {
6868
pub fn fn_sig(&self) -> PolyFnSig<'tcx> {
6969
let did = self.def_id().to_def_id();
7070
if self.tcx.is_closure(did) {
71-
let ty = self.tcx.type_of(did);
71+
let ty = self.tcx.type_of(did).subst_identity();
7272
let ty::Closure(_, substs) = ty.kind() else { bug!("type_of closure not ty::Closure") };
7373
substs.as_closure().sig()
7474
} else {

compiler/rustc_const_eval/src/transform/validate.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ impl<'a, 'tcx> Visitor<'tcx> for TypeChecker<'a, 'tcx> {
334334

335335
let kind = match parent_ty.ty.kind() {
336336
&ty::Alias(ty::Opaque, ty::AliasTy { def_id, substs, .. }) => {
337-
self.tcx.bound_type_of(def_id).subst(self.tcx, substs).kind()
337+
self.tcx.type_of(def_id).subst(self.tcx, substs).kind()
338338
}
339339
kind => kind,
340340
};

compiler/rustc_hir_analysis/src/astconv/generics.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ fn generic_arg_mismatch_err(
7777
Res::Def(DefKind::TyParam, src_def_id) => {
7878
if let Some(param_local_id) = param.def_id.as_local() {
7979
let param_name = tcx.hir().ty_param_name(param_local_id);
80-
let param_type = tcx.type_of(param.def_id);
80+
let param_type = tcx.type_of(param.def_id).subst_identity();
8181
if param_type.is_suggestable(tcx, false) {
8282
err.span_suggestion(
8383
tcx.def_span(src_def_id),
@@ -97,7 +97,7 @@ fn generic_arg_mismatch_err(
9797
(
9898
GenericArg::Type(hir::Ty { kind: hir::TyKind::Array(_, len), .. }),
9999
GenericParamDefKind::Const { .. },
100-
) if tcx.type_of(param.def_id) == tcx.types.usize => {
100+
) if tcx.type_of(param.def_id).skip_binder() == tcx.types.usize => {
101101
let snippet = sess.source_map().span_to_snippet(tcx.hir().span(len.hir_id()));
102102
if let Ok(snippet) = snippet {
103103
err.span_suggestion(

compiler/rustc_hir_analysis/src/astconv/mod.rs

+18-10
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ use rustc_hir::{GenericArg, GenericArgs, OpaqueTyOrigin};
3030
use rustc_infer::infer::{InferCtxt, TyCtxtInferExt};
3131
use rustc_middle::middle::stability::AllowUnstable;
3232
use rustc_middle::ty::subst::{self, GenericArgKind, InternalSubsts, SubstsRef};
33+
use rustc_middle::ty::DynKind;
3334
use rustc_middle::ty::GenericParamDefKind;
3435
use rustc_middle::ty::{self, Const, DefIdTree, IsSuggestable, Ty, TyCtxt, TypeVisitable};
35-
use rustc_middle::ty::{DynKind, EarlyBinder};
3636
use rustc_session::lint::builtin::{AMBIGUOUS_ASSOCIATED_ITEMS, BARE_TRAIT_OBJECTS};
3737
use rustc_span::edition::Edition;
3838
use rustc_span::lev_distance::find_best_match_for_name;
@@ -450,7 +450,11 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
450450
.into()
451451
}
452452
(&GenericParamDefKind::Const { .. }, hir::GenericArg::Infer(inf)) => {
453-
let ty = tcx.at(self.span).type_of(param.def_id);
453+
let ty = tcx
454+
.at(self.span)
455+
.type_of(param.def_id)
456+
.no_bound_vars()
457+
.expect("const parameter types cannot be generic");
454458
if self.astconv.allow_ty_infer() {
455459
self.astconv.ct_infer(ty, Some(param), inf.span).into()
456460
} else {
@@ -494,7 +498,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
494498
// Avoid ICE #86756 when type error recovery goes awry.
495499
return tcx.ty_error().into();
496500
}
497-
tcx.at(self.span).bound_type_of(param.def_id).subst(tcx, substs).into()
501+
tcx.at(self.span).type_of(param.def_id).subst(tcx, substs).into()
498502
} else if infer_args {
499503
self.astconv.ty_infer(Some(param), self.span).into()
500504
} else {
@@ -503,7 +507,11 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
503507
}
504508
}
505509
GenericParamDefKind::Const { has_default } => {
506-
let ty = tcx.at(self.span).type_of(param.def_id);
510+
let ty = tcx
511+
.at(self.span)
512+
.type_of(param.def_id)
513+
.no_bound_vars()
514+
.expect("const parameter types cannot be generic");
507515
if ty.references_error() {
508516
return tcx.const_error(ty).into();
509517
}
@@ -1230,7 +1238,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
12301238
}
12311239
hir::def::DefKind::AssocConst => tcx
12321240
.const_error_with_guaranteed(
1233-
tcx.bound_type_of(assoc_item_def_id)
1241+
tcx.type_of(assoc_item_def_id)
12341242
.subst(tcx, projection_ty.skip_binder().substs),
12351243
reported,
12361244
)
@@ -1267,7 +1275,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
12671275
item_segment: &hir::PathSegment<'_>,
12681276
) -> Ty<'tcx> {
12691277
let substs = self.ast_path_substs_for_ty(span, did, item_segment);
1270-
self.tcx().at(span).bound_type_of(did).subst(self.tcx(), substs)
1278+
self.tcx().at(span).type_of(did).subst(self.tcx(), substs)
12711279
}
12721280

12731281
fn conv_object_ty_poly_trait_ref(
@@ -2046,7 +2054,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
20462054
assoc_segment,
20472055
adt_substs,
20482056
);
2049-
let ty = tcx.bound_type_of(assoc_ty_did).subst(tcx, item_substs);
2057+
let ty = tcx.type_of(assoc_ty_did).subst(tcx, item_substs);
20502058
return Ok((ty, DefKind::AssocTy, assoc_ty_did));
20512059
}
20522060
}
@@ -2703,7 +2711,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
27032711
// `Self` in impl (we know the concrete type).
27042712
assert_eq!(opt_self_ty, None);
27052713
// Try to evaluate any array length constants.
2706-
let ty = tcx.at(span).type_of(def_id);
2714+
let ty = tcx.at(span).type_of(def_id).subst_identity();
27072715
let span_of_impl = tcx.span_of_impl(def_id);
27082716
self.prohibit_generics(path.segments.iter(), |err| {
27092717
let def_id = match *ty.kind() {
@@ -2960,7 +2968,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
29602968
None,
29612969
ty::BoundConstness::NotConst,
29622970
);
2963-
EarlyBinder(tcx.at(span).type_of(def_id)).subst(tcx, substs)
2971+
tcx.at(span).type_of(def_id).subst(tcx, substs)
29642972
}
29652973
hir::TyKind::Array(ty, length) => {
29662974
let length = match length {
@@ -2973,7 +2981,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
29732981
tcx.mk_array_with_const_len(self.ast_ty_to_ty(ty), length)
29742982
}
29752983
hir::TyKind::Typeof(e) => {
2976-
let ty_erased = tcx.type_of(e.def_id);
2984+
let ty_erased = tcx.type_of(e.def_id).subst_identity();
29772985
let ty = tcx.fold_regions(ty_erased, |r, _| {
29782986
if r.is_erased() { tcx.lifetimes.re_static } else { r }
29792987
});

compiler/rustc_hir_analysis/src/check/check.rs

+9-9
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ fn check_union(tcx: TyCtxt<'_>, def_id: LocalDefId) {
9393

9494
/// Check that the fields of the `union` do not need dropping.
9595
fn check_union_fields(tcx: TyCtxt<'_>, span: Span, item_def_id: LocalDefId) -> bool {
96-
let item_type = tcx.type_of(item_def_id);
96+
let item_type = tcx.type_of(item_def_id).subst_identity();
9797
if let ty::Adt(def, substs) = item_type.kind() {
9898
assert!(def.is_union());
9999

@@ -170,7 +170,7 @@ fn check_static_inhabited(tcx: TyCtxt<'_>, def_id: LocalDefId) {
170170
// would be enough to check this for `extern` statics, as statics with an initializer will
171171
// have UB during initialization if they are uninhabited, but there also seems to be no good
172172
// reason to allow any statics to be uninhabited.
173-
let ty = tcx.type_of(def_id);
173+
let ty = tcx.type_of(def_id).subst_identity();
174174
let span = tcx.def_span(def_id);
175175
let layout = match tcx.layout_of(ParamEnv::reveal_all().and(ty)) {
176176
Ok(l) => l,
@@ -227,7 +227,7 @@ fn check_opaque(tcx: TyCtxt<'_>, id: hir::ItemId) {
227227
if !tcx.features().impl_trait_projections {
228228
check_opaque_for_inheriting_lifetimes(tcx, item.owner_id.def_id, span);
229229
}
230-
if tcx.type_of(item.owner_id.def_id).references_error() {
230+
if tcx.type_of(item.owner_id.def_id).subst_identity().references_error() {
231231
return;
232232
}
233233
if check_opaque_for_cycles(tcx, item.owner_id.def_id, substs, span, &origin).is_err() {
@@ -425,7 +425,7 @@ fn check_opaque_meets_bounds<'tcx>(
425425
//
426426
// FIXME: Consider wrapping the hidden type in an existential `Binder` and instantiating it
427427
// here rather than using ReErased.
428-
let hidden_ty = tcx.bound_type_of(def_id.to_def_id()).subst(tcx, substs);
428+
let hidden_ty = tcx.type_of(def_id.to_def_id()).subst(tcx, substs);
429429
let hidden_ty = tcx.fold_regions(hidden_ty, |re, _dbi| match re.kind() {
430430
ty::ReErased => infcx.next_region_var(RegionVariableOrigin::MiscVariable(span)),
431431
_ => re,
@@ -492,7 +492,7 @@ fn is_enum_of_nonnullable_ptr<'tcx>(
492492

493493
fn check_static_linkage(tcx: TyCtxt<'_>, def_id: LocalDefId) {
494494
if tcx.codegen_fn_attrs(def_id).import_linkage.is_some() {
495-
if match tcx.type_of(def_id).kind() {
495+
if match tcx.type_of(def_id).subst_identity().kind() {
496496
ty::RawPtr(_) => false,
497497
ty::Adt(adt_def, substs) => !is_enum_of_nonnullable_ptr(tcx, *adt_def, *substs),
498498
_ => true,
@@ -578,7 +578,7 @@ fn check_item_type(tcx: TyCtxt<'_>, id: hir::ItemId) {
578578
}
579579
}
580580
DefKind::TyAlias => {
581-
let pty_ty = tcx.type_of(id.owner_id);
581+
let pty_ty = tcx.type_of(id.owner_id).subst_identity();
582582
let generics = tcx.generics_of(id.owner_id);
583583
check_type_params_are_used(tcx, &generics, pty_ty);
584584
}
@@ -854,7 +854,7 @@ fn check_impl_items_against_trait<'tcx>(
854854
}
855855

856856
pub fn check_simd(tcx: TyCtxt<'_>, sp: Span, def_id: LocalDefId) {
857-
let t = tcx.type_of(def_id);
857+
let t = tcx.type_of(def_id).subst_identity();
858858
if let ty::Adt(def, substs) = t.kind()
859859
&& def.is_struct()
860860
{
@@ -974,7 +974,7 @@ pub(super) fn check_packed(tcx: TyCtxt<'_>, sp: Span, def: ty::AdtDef<'_>) {
974974
&if first {
975975
format!(
976976
"`{}` contains a field of type `{}`",
977-
tcx.type_of(def.did()),
977+
tcx.type_of(def.did()).subst_identity(),
978978
ident
979979
)
980980
} else {
@@ -996,7 +996,7 @@ pub(super) fn check_packed_inner(
996996
def_id: DefId,
997997
stack: &mut Vec<DefId>,
998998
) -> Option<Vec<(DefId, Span)>> {
999-
if let ty::Adt(def, substs) = tcx.type_of(def_id).kind() {
999+
if let ty::Adt(def, substs) = tcx.type_of(def_id).subst_identity().kind() {
10001000
if def.is_struct() || def.is_union() {
10011001
if def.repr().align.is_some() {
10021002
return Some(vec![(def.did(), DUMMY_SP)]);

compiler/rustc_hir_analysis/src/check/compare_impl_item.rs

+9-5
Original file line numberDiff line numberDiff line change
@@ -1605,7 +1605,11 @@ fn compare_generic_param_kinds<'tcx>(
16051605

16061606
let make_param_message = |prefix: &str, param: &ty::GenericParamDef| match param.kind {
16071607
Const { .. } => {
1608-
format!("{} const parameter of type `{}`", prefix, tcx.type_of(param.def_id))
1608+
format!(
1609+
"{} const parameter of type `{}`",
1610+
prefix,
1611+
tcx.type_of(param.def_id).subst_identity()
1612+
)
16091613
}
16101614
Type { .. } => format!("{} type parameter", prefix),
16111615
Lifetime { .. } => unreachable!(),
@@ -1654,8 +1658,8 @@ pub(super) fn compare_impl_const_raw(
16541658
// Create a parameter environment that represents the implementation's
16551659
// method.
16561660
// Compute placeholder form of impl and trait const tys.
1657-
let impl_ty = tcx.type_of(impl_const_item_def.to_def_id());
1658-
let trait_ty = tcx.bound_type_of(trait_const_item_def).subst(tcx, trait_to_impl_substs);
1661+
let impl_ty = tcx.type_of(impl_const_item_def.to_def_id()).subst_identity();
1662+
let trait_ty = tcx.type_of(trait_const_item_def).subst(tcx, trait_to_impl_substs);
16591663
let mut cause = ObligationCause::new(
16601664
impl_c_span,
16611665
impl_const_item_def,
@@ -1927,7 +1931,7 @@ pub(super) fn check_type_bounds<'tcx>(
19271931
bound_vars.push(bound_var);
19281932
tcx.mk_const(
19291933
ty::ConstKind::Bound(ty::INNERMOST, ty::BoundVar::from_usize(bound_vars.len() - 1)),
1930-
tcx.type_of(param.def_id),
1934+
tcx.type_of(param.def_id).subst_identity(),
19311935
)
19321936
.into()
19331937
}
@@ -1937,7 +1941,7 @@ pub(super) fn check_type_bounds<'tcx>(
19371941
let container_id = impl_ty.container_id(tcx);
19381942

19391943
let rebased_substs = impl_ty_substs.rebase_onto(tcx, container_id, impl_trait_ref.substs);
1940-
let impl_ty_value = tcx.type_of(impl_ty.def_id);
1944+
let impl_ty_value = tcx.type_of(impl_ty.def_id).subst_identity();
19411945

19421946
let param_env = tcx.param_env(impl_ty.def_id);
19431947

0 commit comments

Comments
 (0)