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

Parse function parameters attributes #1661

Merged
merged 5 commits into from
Aug 8, 2019
Merged

Parse function parameters attributes #1661

merged 5 commits into from
Aug 8, 2019

Conversation

eupn
Copy link
Contributor

@eupn eupn commented Aug 7, 2019

Fixes #1397. The RFC-2565 specifies #[attributes] to function parameters:

fn foo(#[attr] a, #[unused] b, #[must_use] ...) {
    // ...
}

This PR adds those attributes into grammar and to the parser, extending corresponding inline tests.

Copy link
Member

@matklad matklad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@matklad
Copy link
Member

matklad commented Aug 8, 2019

bros r+

Thanks!

@bors
Copy link
Contributor

bors bot commented Aug 8, 2019

👊

@matklad
Copy link
Member

matklad commented Aug 8, 2019

bors r+

bors bot added a commit that referenced this pull request Aug 8, 2019
1661: Parse function parameters attributes r=matklad a=eupn

Fixes #1397. The [RFC-2565](https://github.com/rust-lang/rfcs/blob/master/text/2565-formal-function-parameter-attributes.md) specifies `#[attributes]` to function parameters:

```rust
fn foo(#[attr] a, #[unused] b, #[must_use] ...) {
    // ...
}
```

This PR adds those attributes into grammar and to the parser, extending corresponding inline tests.

Co-authored-by: Evgenii P <[email protected]>
@bors
Copy link
Contributor

bors bot commented Aug 8, 2019

Build succeeded

@bors bors bot merged commit 6fa2d82 into rust-lang:master Aug 8, 2019
@eupn eupn deleted the add-fn-param-attrs branch August 8, 2019 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for attributes in function parameters
2 participants