mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 16:54:01 +00:00
try fast path for wf type ops
This commit is contained in:
parent
aac2f84794
commit
66090ef7ba
@ -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
|
None
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user