Skip to content

Commit cab6740

Browse files
committed
Add documentation about lifetime args
1 parent a3bfdc7 commit cab6740

File tree

1 file changed

+2
-0
lines changed
  • compiler/rustc_ast_lowering/src

1 file changed

+2
-0
lines changed

compiler/rustc_ast_lowering/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1477,6 +1477,8 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
14771477
})
14781478
});
14791479

1480+
// This creates HIR lifetime arguments as `hir::GenericArg`, in the given example `type
1481+
// TestReturn<'a, T, 'x> = impl Debug + 'x`, it creates a collection containing `&['x]`.
14801482
let lifetimes =
14811483
self.arena.alloc_from_iter(collected_lifetimes.into_iter().map(|(_, lifetime)| {
14821484
let id = self.next_node_id();

0 commit comments

Comments
 (0)