Skip to content

Commit

Permalink
try fast path for wf type ops
Browse files Browse the repository at this point in the history
  • Loading branch information
aliemjay authored and lcnr committed Jan 16, 2024
1 parent aac2f84 commit 66090ef
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,23 @@ impl<'tcx> super::QueryTypeOp<'tcx> for ProvePredicate<'tcx> {
}
}

if let ty::PredicateKind::Clause(ty::ClauseKind::WellFormed(arg)) =
key.value.predicate.kind().skip_binder()
{
match arg.as_type()?.kind() {
ty::Param(_)
| ty::Bool
| ty::Char
| ty::Int(_)
| ty::Float(_)
| ty::Str
| ty::Uint(_) => {
return Some(());
}
_ => {}
}
}

None
}

Expand Down

0 comments on commit 66090ef

Please sign in to comment.