Use start_point instead of next_point to point to elided lifetime ampersand.
This commit is contained in:
parent
55f46419af
commit
f6af4efec5
4 changed files with 35 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue