1
Fork 0

Rollup merge of #137912 - compiler-errors:no-missing-lifetime-recovery, r=oli-obk

Do not recover missing lifetime with random in-scope lifetime

Suppresses a ton of stray errors, since this recovery doesn't really make sense anymore now that we have a dedicated `ReError` kind.

r? oli-obk or reassign
This commit is contained in:
Jubilee 2025-03-04 19:37:00 -08:00 committed by GitHub
commit 99efb4204d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 36 additions and 180 deletions

View file

@ -3515,12 +3515,6 @@ impl<'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
}
}
}
// Record as using the suggested resolution.
let (_, (_, res)) = in_scope_lifetimes[0];
for &lt in &lifetime_refs {
self.r.lifetimes_res_map.insert(lt.id, res);
}
}
_ => {
let lifetime_spans: Vec<_> =