Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
try fast path for wf type ops
  • Loading branch information
aliemjay authored and lcnr committed Jan 16, 2024
commit 66090ef7ba5f8586879f8029400a1cc851e7c57f
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