Skip to content

Commit 66c1799

Browse files
committed
Use no_bound_vars
1 parent 476bd53 commit 66c1799

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

compiler/rustc_traits/src/implied_outlives_bounds.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,9 @@ fn compute_implied_outlives_bounds<'tcx>(
9494
// region relationships.
9595
implied_bounds.extend(obligations.into_iter().flat_map(|obligation| {
9696
assert!(!obligation.has_escaping_bound_vars());
97-
let binder = obligation.predicate.bound_atom();
98-
if binder.skip_binder().has_escaping_bound_vars() {
99-
vec![]
100-
} else {
101-
match binder.skip_binder() {
97+
match obligation.predicate.bound_atom().no_bound_vars() {
98+
None => vec![],
99+
Some(pred) => match pred {
102100
ty::PredicateAtom::Trait(..)
103101
| ty::PredicateAtom::Subtype(..)
104102
| ty::PredicateAtom::Projection(..)
@@ -122,7 +120,7 @@ fn compute_implied_outlives_bounds<'tcx>(
122120
tcx.push_outlives_components(ty_a, &mut components);
123121
implied_bounds_from_components(r_b, components)
124122
}
125-
}
123+
},
126124
}
127125
}));
128126
}

0 commit comments

Comments
 (0)