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

@@ -1228,7 +1228,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
} else {
self.next_node_id()
};
let span = self.tcx.sess.source_map().next_point(t.span.shrink_to_lo());
let span = self.tcx.sess.source_map().start_point(t.span);
Lifetime { ident: Ident::new(kw::UnderscoreLifetime, span), id }
});
let lifetime = self.lower_lifetime(&region);