1
Fork 0

change usages of type_of to bound_type_of

This commit is contained in:
Kyle Matsuda 2023-02-06 17:48:12 -07:00
parent 9a7cc6c32f
commit d822b97a27
136 changed files with 385 additions and 262 deletions

View file

@ -1143,8 +1143,8 @@ fn fn_sig(tcx: TyCtxt<'_>, def_id: DefId) -> ty::EarlyBinder<ty::PolyFnSig<'_>>
}
Ctor(data) | Variant(hir::Variant { data, .. }) if data.ctor().is_some() => {
let ty = tcx.type_of(tcx.hir().get_parent_item(hir_id));
let inputs = data.fields().iter().map(|f| tcx.type_of(f.def_id));
let ty = tcx.bound_type_of(tcx.hir().get_parent_item(hir_id)).subst_identity();
let inputs = data.fields().iter().map(|f| tcx.bound_type_of(f.def_id).subst_identity());
ty::Binder::dummy(tcx.mk_fn_sig(
inputs,
ty,
@ -1345,7 +1345,7 @@ fn impl_trait_ref(tcx: TyCtxt<'_>, def_id: DefId) -> Option<ty::EarlyBinder<ty::
.of_trait
.as_ref()
.map(|ast_trait_ref| {
let selfty = tcx.type_of(def_id);
let selfty = tcx.bound_type_of(def_id).subst_identity();
icx.astconv().instantiate_mono_trait_ref(
ast_trait_ref,
selfty,