Rollup merge of #112734 - dswij:bounds-predicates-clause, r=compiler-errors
Make `Bound::predicates` use `Clause` Part of #107250 `Bound::predicates` returns an iterator over `Binder<_, Clause>` instead of `Predicate`. I tried updating `explicit_predicates_of` as well, but it seems that it needs a lot more change than I thought. Will do it in a separate PR instead.
This commit is contained in:
commit
3436069c34
6 changed files with 57 additions and 24 deletions
|
@ -1270,13 +1270,13 @@ impl<'tcx> Visitor<'tcx> for TypePrivacyVisitor<'tcx> {
|
|||
);
|
||||
|
||||
for (pred, _) in bounds.predicates() {
|
||||
match pred.kind().skip_binder() {
|
||||
ty::PredicateKind::Clause(ty::Clause::Trait(trait_predicate)) => {
|
||||
match pred.skip_binder() {
|
||||
ty::Clause::Trait(trait_predicate) => {
|
||||
if self.visit_trait(trait_predicate.trait_ref).is_break() {
|
||||
return;
|
||||
}
|
||||
}
|
||||
ty::PredicateKind::Clause(ty::Clause::Projection(proj_predicate)) => {
|
||||
ty::Clause::Projection(proj_predicate) => {
|
||||
let term = self.visit(proj_predicate.term);
|
||||
if term.is_break()
|
||||
|| self.visit_projection_ty(proj_predicate.projection_ty).is_break()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue