Ignore other PredicateKinds in rustdoc auto trait finder

Fixes #92073

There's not really anything we can do with them, and they're
causing ICEs. I'm not using a wildcard match, as we should check
that any new `PredicateKind`s are handled properly by rustdoc.
This commit is contained in:
Aaron Hill 2021-12-18 11:25:05 -05:00
parent 7abab1efb2
commit d31f7f1097
No known key found for this signature in database
GPG key ID: B4087E510E98B164

View file

@ -839,7 +839,17 @@ impl<'tcx> AutoTraitFinder<'tcx> {
_ => return false,
}
}
_ => panic!("Unexpected predicate {:?} {:?}", ty, predicate),
// There's not really much we can do with these predicates -
// we start out with a `ParamEnv` with no inference variables,
// and these don't correspond to adding any new bounds to
// the `ParamEnv`.
ty::PredicateKind::WellFormed(..)
| ty::PredicateKind::ObjectSafe(..)
| ty::PredicateKind::ClosureKind(..)
| ty::PredicateKind::Subtype(..)
| ty::PredicateKind::ConstEvaluatable(..)
| ty::PredicateKind::Coerce(..)
| ty::PredicateKind::TypeWellFormedFromEnv(..) => {}
};
}
true