remove bound_type_of query; make type_of return EarlyBinder; change type_of in metadata
This commit is contained in:
parent
d822b97a27
commit
c183110cc2
164 changed files with 325 additions and 380 deletions
|
@ -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.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());
|
||||
let ty = tcx.type_of(tcx.hir().get_parent_item(hir_id)).subst_identity();
|
||||
let inputs = data.fields().iter().map(|f| tcx.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.bound_type_of(def_id).subst_identity();
|
||||
let selfty = tcx.type_of(def_id).subst_identity();
|
||||
icx.astconv().instantiate_mono_trait_ref(
|
||||
ast_trait_ref,
|
||||
selfty,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue