1
Fork 0

More nits

This commit is contained in:
Michael Goulet 2022-11-10 21:29:20 +00:00
parent 43ad19b250
commit fea8d0eb99
3 changed files with 19 additions and 4 deletions

View file

@ -959,10 +959,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
fn coinductive_predicate(&self, predicate: ty::Predicate<'tcx>) -> bool {
let result = match predicate.kind().skip_binder() {
ty::PredicateKind::Trait(ref data) => {
self.tcx().trait_is_auto(data.def_id())
|| self.tcx().lang_items().sized_trait() == Some(data.def_id())
}
ty::PredicateKind::Trait(ref data) => self.tcx().trait_is_coinductive(data.def_id()),
ty::PredicateKind::WellFormed(_) => true,
_ => false,
};