diff options
| author | Michael Goulet <michael@errs.io> | 2024-05-15 10:05:25 -0400 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-05-16 14:23:47 -0400 |
| commit | 11ec3eca740d128eee15c40f930c4d13d72be7dd (patch) | |
| tree | 5a504a05011ac96618088805bc6ddf97abb6bc48 /compiler/rustc_trait_selection/src/traits/mod.rs | |
| parent | 97bf25c8cf6c7c97c851c6e8bc94fd0824885e6f (diff) | |
| download | rust-11ec3eca740d128eee15c40f930c4d13d72be7dd.tar.gz rust-11ec3eca740d128eee15c40f930c4d13d72be7dd.zip | |
Rename ToPredicate for Upcast
Diffstat (limited to 'compiler/rustc_trait_selection/src/traits/mod.rs')
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/mod.rs b/compiler/rustc_trait_selection/src/traits/mod.rs index 61f47bc1f23..7dd944ba850 100644 --- a/compiler/rustc_trait_selection/src/traits/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/mod.rs @@ -34,7 +34,7 @@ use rustc_middle::query::Providers; use rustc_middle::span_bug; use rustc_middle::ty::fold::TypeFoldable; use rustc_middle::ty::visit::{TypeVisitable, TypeVisitableExt}; -use rustc_middle::ty::{self, ToPredicate, Ty, TyCtxt, TypeFolder, TypeSuperVisitable}; +use rustc_middle::ty::{self, Ty, TyCtxt, TypeFolder, TypeSuperVisitable, Upcast}; use rustc_middle::ty::{GenericArgs, GenericArgsRef}; use rustc_span::def_id::DefId; use rustc_span::Span; @@ -142,7 +142,7 @@ pub fn type_known_to_meet_bound_modulo_regions<'tcx>( fn pred_known_to_hold_modulo_regions<'tcx>( infcx: &InferCtxt<'tcx>, param_env: ty::ParamEnv<'tcx>, - pred: impl ToPredicate<'tcx>, + pred: impl Upcast<'tcx>, ) -> bool { let obligation = Obligation::new(infcx.tcx, ObligationCause::dummy(), param_env, pred); @@ -457,7 +457,7 @@ fn instantiate_and_check_impossible_predicates<'tcx>( // associated items. if let Some(trait_def_id) = tcx.trait_of_item(key.0) { let trait_ref = ty::TraitRef::from_method(tcx, trait_def_id, key.1); - predicates.push(ty::Binder::dummy(trait_ref).to_predicate(tcx)); + predicates.push(ty::Binder::dummy(trait_ref).upcast(tcx)); } predicates.retain(|predicate| !predicate.has_param()); |
