Auto merge of #142223 - compiler-errors:perf-wf, r=lcnr
Fast path for WF goals in new solver Hopefully self-explanatory.
This commit is contained in:
@@ -662,6 +662,10 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
||||
}
|
||||
|
||||
ty::PredicateKind::Clause(ty::ClauseKind::WellFormed(term)) => {
|
||||
if term.is_trivially_wf(self.tcx()) {
|
||||
return Ok(EvaluatedToOk);
|
||||
}
|
||||
|
||||
// So, there is a bit going on here. First, `WellFormed` predicates
|
||||
// are coinductive, like trait predicates with auto traits.
|
||||
// This means that we need to detect if we have recursively
|
||||
|
||||
Reference in New Issue
Block a user