1
Fork 0

Do not recover missing lifetime with random in-scope lifetime

This commit is contained in:
Michael Goulet 2025-03-03 05:14:52 +00:00
parent daf59857d6
commit 0ad48b47e6
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<_> =