Add documentation about lifetime args

This commit is contained in:
Santiago Pastorino 2022-08-04 09:56:12 -03:00
parent a3bfdc77a7
commit cab67404a4
No known key found for this signature in database
GPG key ID: 8131A24E0C79EFAF

View file

@ -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();