Skip to content

Fix the definition of MetaItem and MetaSeq #330

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

Merged
merged 2 commits into from
May 9, 2018
Merged

Conversation

mjbshaw
Copy link
Contributor

@mjbshaw mjbshaw commented May 6, 2018

The current definitions mean that the following are valid attributes:

  • #[foo(,)]
  • #[foo(, , , , ,)]

These aren't (intended to be) valid. This fixes the definitions to only allow an EMPTY at the end of a comma-separated list.

The current definitions mean that the following are valid attributes:

- `#[foo(,)]`
- `#[foo(, , , , ,)]`

These aren't (intended to be) valid. This fixes the definitions to only allow an EMPTY at the end of a comma-separated list.
Copy link
Contributor

@Havvy Havvy left a comment

Choose a reason for hiding this comment

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

LGTM, but you can actually remove line 18 completely since it falls out of line 17 with the MetaSeq of line 23. As such, want to remove that line?

MetaSeq's definition makes this unnecessary
@mjbshaw
Copy link
Contributor Author

mjbshaw commented May 9, 2018

@Havvy Good catch. Done.

@Havvy Havvy merged commit 465db1c into rust-lang:master May 9, 2018
@Havvy
Copy link
Contributor

Havvy commented May 9, 2018

💟 Thanks!

@mjbshaw mjbshaw deleted the patch-1 branch May 9, 2018 15:19
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.

2 participants