Don't call diagnostic_hir_wf_check query if we have infer variables
This commit is contained in:
parent
53e4b9dd74
commit
64ad337a3b
3 changed files with 51 additions and 0 deletions
|
@ -555,6 +555,7 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
|
|||
// can get a better error message by performing HIR-based well-formedness checking.
|
||||
if let ObligationCauseCode::WellFormed(Some(wf_loc)) =
|
||||
root_obligation.cause.code().peel_derives()
|
||||
&& !obligation.predicate.has_non_region_infer()
|
||||
{
|
||||
if let Some(cause) = self
|
||||
.tcx
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue