change impl_trait_ref query to return EarlyBinder; remove bound_impl_trait_ref query; add EarlyBinder to impl_trait_ref in metadata
This commit is contained in:
parent
be130b57d4
commit
f29a334c90
59 changed files with 108 additions and 127 deletions
|
@ -22,7 +22,7 @@ fn assumed_wf_types(tcx: TyCtxt<'_>, def_id: DefId) -> &ty::List<Ty<'_>> {
|
|||
tcx.intern_type_list(&assumed_wf_types)
|
||||
}
|
||||
DefKind::Impl => {
|
||||
match tcx.bound_impl_trait_ref(def_id).map(ty::EarlyBinder::subst_identity) {
|
||||
match tcx.impl_trait_ref(def_id).map(ty::EarlyBinder::subst_identity) {
|
||||
Some(trait_ref) => {
|
||||
let types: Vec<_> = trait_ref.substs.types().collect();
|
||||
tcx.intern_type_list(&types)
|
||||
|
|
|
@ -289,7 +289,7 @@ fn well_formed_types_in_env(tcx: TyCtxt<'_>, def_id: DefId) -> &ty::List<Predica
|
|||
// In a trait impl, we assume that the header trait ref and all its
|
||||
// constituents are well-formed.
|
||||
NodeKind::TraitImpl => {
|
||||
let trait_ref = tcx.bound_impl_trait_ref(def_id).expect("not an impl").subst_identity();
|
||||
let trait_ref = tcx.impl_trait_ref(def_id).expect("not an impl").subst_identity();
|
||||
|
||||
// FIXME(chalk): this has problems because of late-bound regions
|
||||
//inputs.extend(trait_ref.substs.iter().flat_map(|arg| arg.walk()));
|
||||
|
@ -359,7 +359,7 @@ fn issue33140_self_ty(tcx: TyCtxt<'_>, def_id: DefId) -> Option<Ty<'_>> {
|
|||
debug!("issue33140_self_ty({:?})", def_id);
|
||||
|
||||
let trait_ref = tcx
|
||||
.bound_impl_trait_ref(def_id)
|
||||
.impl_trait_ref(def_id)
|
||||
.unwrap_or_else(|| bug!("issue33140_self_ty called on inherent impl {:?}", def_id))
|
||||
.skip_binder();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue