Use is_trivially_wf for ProvePredicate fast path
This commit is contained in:
@@ -21,19 +21,9 @@ impl<'tcx> super::QueryTypeOp<'tcx> for ProvePredicate<'tcx> {
|
||||
|
||||
if let ty::PredicateKind::Clause(ty::ClauseKind::WellFormed(term)) =
|
||||
key.value.predicate.kind().skip_binder()
|
||||
&& term.is_trivially_wf(tcx)
|
||||
{
|
||||
match term.as_type()?.kind() {
|
||||
ty::Param(_)
|
||||
| ty::Bool
|
||||
| ty::Char
|
||||
| ty::Int(_)
|
||||
| ty::Float(_)
|
||||
| ty::Str
|
||||
| ty::Uint(_) => {
|
||||
return Some(());
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
return Some(());
|
||||
}
|
||||
|
||||
None
|
||||
|
||||
Reference in New Issue
Block a user