implied_bounds.extend(obligations.into_iter().flat_map(|obligation| {
assert!(!obligation.has_escaping_bound_vars());
match obligation.predicate.kind() {
- ty::PredicateKind::Trait(..)
- | ty::PredicateKind::Subtype(..)
- | ty::PredicateKind::Projection(..)
- | ty::PredicateKind::ClosureKind(..)
- | ty::PredicateKind::ObjectSafe(..)
- | ty::PredicateKind::ConstEvaluatable(..)
- | ty::PredicateKind::ConstEquate(..) => vec![],
-
- &ty::PredicateKind::WellFormed(arg) => {
- wf_args.push(arg);
- vec![]
- }
+ &ty::PredicateKind::ForAll(..) => vec![],
+ &ty::PredicateKind::Atom(atom) => match atom {
+ ty::PredicateAtom::Trait(..)
+ | ty::PredicateAtom::Subtype(..)
+ | ty::PredicateAtom::Projection(..)
+ | ty::PredicateAtom::ClosureKind(..)
+ | ty::PredicateAtom::ObjectSafe(..)
+ | ty::PredicateAtom::ConstEvaluatable(..)
+ | ty::PredicateAtom::ConstEquate(..) => vec![],
+ ty::PredicateAtom::WellFormed(arg) => {
+ wf_args.push(arg);
+ vec![]
+ }
- ty::PredicateKind::RegionOutlives(ref data) => match data.no_bound_vars() {
- None => vec![],
- Some(ty::OutlivesPredicate(r_a, r_b)) => {
+ ty::PredicateAtom::RegionOutlives(ty::OutlivesPredicate(r_a, r_b)) => {
vec![OutlivesBound::RegionSubRegion(r_b, r_a)]
}
- },
- ty::PredicateKind::TypeOutlives(ref data) => match data.no_bound_vars() {
- None => vec![],
- Some(ty::OutlivesPredicate(ty_a, r_b)) => {
+ ty::PredicateAtom::TypeOutlives(ty::OutlivesPredicate(ty_a, r_b)) => {
let ty_a = infcx.resolve_vars_if_possible(&ty_a);
let mut components = smallvec![];
tcx.push_outlives_components(ty_a, &mut components);