1
Fork 0

Use start_point instead of next_point to point to elided lifetime ampersand.

This commit is contained in:
Camille GILLOT 2022-08-07 14:35:11 +02:00
parent 55f46419af
commit f6af4efec5
4 changed files with 35 additions and 2 deletions

View file

@ -629,7 +629,7 @@ impl<'a: 'ast, 'ast> Visitor<'ast> for LateResolutionVisitor<'a, '_, 'ast> {
// Elided lifetime in reference: we resolve as if there was some lifetime `'_` with
// NodeId `ty.id`.
// This span will be used in case of elision failure.
let span = self.r.session.source_map().next_point(ty.span.shrink_to_lo());
let span = self.r.session.source_map().start_point(ty.span);
self.resolve_elided_lifetime(ty.id, span);
visit::walk_ty(self, ty);
}