Closed Bromeon closed 9 months ago
Adds support for lifetimes in function receiver parameters:
fn method(&'a self); fn prototype<'b>(&'b mut self);
This adds a new type Lifetime which is also reused in GenericArg. I thought that makes more sense than separate (Punct, Ident) tuples, as I could also imagine to add some utility parsing functions in the future. Let me know what you think.
Lifetime
GenericArg
(Punct, Ident)
Based on #55, the interesting diff is here, in 2 commits.
LGTM, needs a rebase.
Rebased. Also added the missing Item::as_*() methods to get direct access to a certain item type.
Item::as_*()
Adds support for lifetimes in function receiver parameters:
This adds a new type
Lifetime
which is also reused inGenericArg
. I thought that makes more sense than separate(Punct, Ident)
tuples, as I could also imagine to add some utility parsing functions in the future. Let me know what you think.Based on #55, the interesting diff is here, in 2 commits.