Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for lifetimes in receiver parameters #56

Merged
merged 3 commits into from
Feb 22, 2024

Conversation

Bromeon
Copy link
Collaborator

@Bromeon Bromeon commented Feb 19, 2024

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.

Based on #55, the interesting diff is here, in 2 commits.

@Bromeon Bromeon added the enhancement New feature or request label Feb 19, 2024
@Bromeon Bromeon force-pushed the feature/param-lifetimes branch 2 times, most recently from 1ae5627 to 4aba53a Compare February 19, 2024 23:04
@PoignardAzur
Copy link
Owner

LGTM, needs a rebase.

@Bromeon Bromeon force-pushed the feature/param-lifetimes branch from 4aba53a to 4951192 Compare February 21, 2024 21:37
@Bromeon
Copy link
Collaborator Author

Bromeon commented Feb 21, 2024

Rebased. Also added the missing Item::as_*() methods to get direct access to a certain item type.

@PoignardAzur PoignardAzur merged commit 32ade31 into PoignardAzur:main Feb 22, 2024
3 checks passed
@Bromeon Bromeon deleted the feature/param-lifetimes branch February 22, 2024 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants