diff options
| author | Jack Huey <31162821+jackh726@users.noreply.github.com> | 2022-08-02 22:44:08 -0400 |
|---|---|---|
| committer | Jack Huey <31162821+jackh726@users.noreply.github.com> | 2022-08-02 22:44:08 -0400 |
| commit | e21624dc80a455ecbd7de6d45524becf20b35ed2 (patch) | |
| tree | f02c2b8c424e92d606b79eb6ef4edd706064effe /compiler/rustc_trait_selection/src/traits | |
| parent | 4493a0f4724c0bae1436242d76cccc9c0a287b80 (diff) | |
| download | rust-e21624dc80a455ecbd7de6d45524becf20b35ed2.tar.gz rust-e21624dc80a455ecbd7de6d45524becf20b35ed2.zip | |
Add bound_predicates_of and bound_explicit_predicates_of
Diffstat (limited to 'compiler/rustc_trait_selection/src/traits')
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/select/mod.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/select/mod.rs b/compiler/rustc_trait_selection/src/traits/select/mod.rs index 17f34012d1d..155c1289876 100644 --- a/compiler/rustc_trait_selection/src/traits/select/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/select/mod.rs @@ -2356,11 +2356,11 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> { // obligation will normalize to `<$0 as Iterator>::Item = $1` and // `$1: Copy`, so we must ensure the obligations are emitted in // that order. - let predicates = tcx.predicates_of(def_id); + let predicates = tcx.bound_predicates_of(def_id); debug!(?predicates); - assert_eq!(predicates.parent, None); - let mut obligations = Vec::with_capacity(predicates.predicates.len()); - for (predicate, span) in predicates.predicates { + assert_eq!(predicates.0.parent, None); + let mut obligations = Vec::with_capacity(predicates.0.predicates.len()); + for (predicate, span) in predicates.0.predicates { let span = *span; let cause = cause.clone().derived_cause(parent_trait_pred, |derived| { ImplDerivedObligation(Box::new(ImplDerivedObligationCause { @@ -2374,7 +2374,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> { param_env, cause.clone(), recursion_depth, - EarlyBinder(*predicate).subst(tcx, substs), + predicates.rebind(*predicate).subst(tcx, substs), &mut obligations, ); obligations.push(Obligation { cause, recursion_depth, param_env, predicate }); |
