Skip to content

Commit

Permalink
Rollup merge of #92076 - Aaron1011:rustdoc-auto-trait-ignore, r=cjgillot
Browse files Browse the repository at this point in the history
Ignore other `PredicateKind`s 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.
  • Loading branch information
matthiaskrgr authored Dec 28, 2021
2 parents e91ad5f + d31f7f1 commit bec499e
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion compiler/rustc_trait_selection/src/traits/auto_trait.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bec499e

Please sign in to comment.