diff options
| author | Michael Goulet <michael@errs.io> | 2023-06-22 18:17:13 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2023-06-26 23:12:03 +0000 |
| commit | fbdef58414af2b3469bf4f0f83bb136945414b96 (patch) | |
| tree | 7545b3a8de7c20547d91613e727e04b30f3fb67f /compiler/rustc_infer/src/traits/util.rs | |
| parent | 36fb58e433c782e27dd41034284e157cf86d587f (diff) | |
| download | rust-fbdef58414af2b3469bf4f0f83bb136945414b96.tar.gz rust-fbdef58414af2b3469bf4f0f83bb136945414b96.zip | |
Migrate predicates_of and caller_bounds to Clause
Diffstat (limited to 'compiler/rustc_infer/src/traits/util.rs')
| -rw-r--r-- | compiler/rustc_infer/src/traits/util.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_infer/src/traits/util.rs b/compiler/rustc_infer/src/traits/util.rs index 26919872952..52f16a1b25c 100644 --- a/compiler/rustc_infer/src/traits/util.rs +++ b/compiler/rustc_infer/src/traits/util.rs @@ -258,7 +258,8 @@ impl<'tcx, O: Elaboratable<'tcx>> Elaborator<'tcx, O> { pred = pred.without_const(tcx); } elaboratable.child_with_derived_cause( - pred.subst_supertrait(tcx, &bound_predicate.rebind(data.trait_ref)), + pred.subst_supertrait(tcx, &bound_predicate.rebind(data.trait_ref)) + .as_predicate(), span, bound_predicate.rebind(data), index, @@ -440,7 +441,7 @@ pub fn transitive_bounds_that_define_assoc_item<'tcx>( tcx.super_predicates_that_define_assoc_item((trait_ref.def_id(), assoc_name)); for (super_predicate, _) in super_predicates.predicates { let subst_predicate = super_predicate.subst_supertrait(tcx, &trait_ref); - if let Some(binder) = subst_predicate.to_opt_poly_trait_pred() { + if let Some(binder) = subst_predicate.as_trait_clause() { stack.push(binder.map_bound(|t| t.trait_ref)); } } |
