diff options
| author | Santiago Pastorino <spastorino@gmail.com> | 2022-08-04 10:12:56 -0300 |
|---|---|---|
| committer | Santiago Pastorino <spastorino@gmail.com> | 2022-08-04 11:27:02 -0300 |
| commit | 5e716599837090cb280ef98b87d6a22fbbc89084 (patch) | |
| tree | a4e711870005ddf2b6a323b713093b0c326b1065 | |
| parent | f8b1b2bdfb0baf687873af1bbcbb7292bc39a3f7 (diff) | |
| download | rust-5e716599837090cb280ef98b87d6a22fbbc89084.tar.gz rust-5e716599837090cb280ef98b87d6a22fbbc89084.zip | |
Add docs to record_elided_anchor
| -rw-r--r-- | compiler/rustc_ast_lowering/src/lifetime_collector.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_ast_lowering/src/lifetime_collector.rs b/compiler/rustc_ast_lowering/src/lifetime_collector.rs index 1a9677919d0..d22b099dd22 100644 --- a/compiler/rustc_ast_lowering/src/lifetime_collector.rs +++ b/compiler/rustc_ast_lowering/src/lifetime_collector.rs @@ -30,6 +30,9 @@ impl<'ast> LifetimeCollectVisitor<'ast> { } } + /// This collect lifetimes that are elided, for nodes like `Foo<T>` where there are no explicit + /// lifetime nodes. Is equivalent to having "pseudo" nodes introduced for each of the node ids + /// in the list start..end. fn record_elided_anchor(&mut self, node_id: NodeId, span: Span) { if let Some(LifetimeRes::ElidedAnchor { start, end }) = self.resolver.get_lifetime_res(node_id) |
