Rollup merge of #105283 - compiler-errors:ty-var-in-hir-wfcheck, r=nagisa
Don't call `diagnostic_hir_wf_check` query if we have infer variables Fixes #105260
This commit is contained in:
commit
aa7b5b32e3
3 changed files with 51 additions and 0 deletions
|
@ -597,6 +597,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