We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1802d45 commit c390bdaCopy full SHA for c390bda
compiler/rustc_ast_lowering/src/lifetime_collector.rs
@@ -64,6 +64,18 @@ impl<'ast> Visitor<'ast> for LifetimeCollectVisitor<'ast> {
64
visit::walk_ty(self, t);
65
self.current_binders.pop();
66
}
67
+ TyKind::Rptr(None, _) => {
68
+ if let Some(LifetimeRes::ElidedAnchor { start, end }) =
69
+ self.resolver.get_lifetime_res(t.id)
70
+ {
71
+ for i in start..end {
72
+ let lifetime =
73
+ Lifetime { id: i, ident: Ident::new(kw::UnderscoreLifetime, t.span) };
74
+ self.record_lifetime_use(lifetime);
75
+ }
76
77
+ visit::walk_ty(self, t);
78
79
_ => {
80
81
0 commit comments