From f29a334c90e29ffbe236f9abba9aa08bfda597c6 Mon Sep 17 00:00:00 2001 From: Kyle Matsuda Date: Tue, 10 Jan 2023 14:57:22 -0700 Subject: change impl_trait_ref query to return EarlyBinder; remove bound_impl_trait_ref query; add EarlyBinder to impl_trait_ref in metadata --- compiler/rustc_ty_utils/src/implied_bounds.rs | 2 +- compiler/rustc_ty_utils/src/ty.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'compiler/rustc_ty_utils/src') diff --git a/compiler/rustc_ty_utils/src/implied_bounds.rs b/compiler/rustc_ty_utils/src/implied_bounds.rs index d890a04599b..7a9c1d8ffe7 100644 --- a/compiler/rustc_ty_utils/src/implied_bounds.rs +++ b/compiler/rustc_ty_utils/src/implied_bounds.rs @@ -22,7 +22,7 @@ fn assumed_wf_types(tcx: TyCtxt<'_>, def_id: DefId) -> &ty::List> { 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) diff --git a/compiler/rustc_ty_utils/src/ty.rs b/compiler/rustc_ty_utils/src/ty.rs index 78c3a208e88..eb5454bf263 100644 --- a/compiler/rustc_ty_utils/src/ty.rs +++ b/compiler/rustc_ty_utils/src/ty.rs @@ -289,7 +289,7 @@ fn well_formed_types_in_env(tcx: TyCtxt<'_>, def_id: DefId) -> &ty::List { - 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> { 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(); -- cgit 1.4.1-3-g733a5