diff options
| author | Santiago Pastorino <spastorino@gmail.com> | 2022-08-04 09:56:12 -0300 |
|---|---|---|
| committer | Santiago Pastorino <spastorino@gmail.com> | 2022-08-04 11:27:01 -0300 |
| commit | cab67404a4b7ffbf5c323d663c20069c73316950 (patch) | |
| tree | 3073a5675b4cffa18c7f2a8df9211c2ef446d785 | |
| parent | a3bfdc77a7311287e1869c5bee5d9c2213963296 (diff) | |
| download | rust-cab67404a4b7ffbf5c323d663c20069c73316950.tar.gz rust-cab67404a4b7ffbf5c323d663c20069c73316950.zip | |
Add documentation about lifetime args
| -rw-r--r-- | compiler/rustc_ast_lowering/src/lib.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_ast_lowering/src/lib.rs b/compiler/rustc_ast_lowering/src/lib.rs index 2608e3a5639..b1224079c2c 100644 --- a/compiler/rustc_ast_lowering/src/lib.rs +++ b/compiler/rustc_ast_lowering/src/lib.rs @@ -1477,6 +1477,8 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { }) }); + // This creates HIR lifetime arguments as `hir::GenericArg`, in the given example `type + // TestReturn<'a, T, 'x> = impl Debug + 'x`, it creates a collection containing `&['x]`. let lifetimes = self.arena.alloc_from_iter(collected_lifetimes.into_iter().map(|(_, lifetime)| { let id = self.next_node_id(); |
