-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
New attribute syntax incompatible with macro_rules attr matchers #13067
Comments
brson
added a commit
to brson/rust
that referenced
this issue
Mar 22, 2014
This exposes issue rust-lang#13067, in which the new inner attribute syntax is incompatible with macro_rules! `attr` matchers. I had to 'ignore' compile-fail/macro-inner-attributes.
We decided in today's meeting to add a new macro_rules! foo( (#[$foo:meta]) => ( fn foo() { #![$foo] } ) ) |
It would be very nice to get the attribute syntax conversion done for 0.10, but this is blocking, and I don't think I will get to it this week. |
alexcrichton
added a commit
to alexcrichton/rust
that referenced
this issue
Mar 28, 2014
This removes the `attr` matcher and adds a `meta` matcher. The previous `attr` matcher is now ambiguous because it doesn't disambiguate whether it means inner attribute or outer attribute. The new behavior can still be achieved by taking an argument of the form `#[$foo:meta]` (the brackets are part of the macro pattern). Closes rust-lang#13067
flip1995
pushed a commit
to flip1995/rust
that referenced
this issue
Jul 11, 2024
Misc refactorings part 3 And some more changes. Same general idea of checking the HIR tree first when linting. changelog: none
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a problem in compile-fail/macro-inner-attributes.rs under the new attribute syntax. In macro_rules, an
attr
matcher matches#[foo]
, which leaves no way to match inner attributes. @alexcrichton suggests changing these tometa
matchers that don't match the#
or brackets. Nominating.The text was updated successfully, but these errors were encountered: