]> git.lizzy.rs Git - rust.git/commit
syntax: Accept meta matchers in macros
authorAlex Crichton <alex@alexcrichton.com>
Wed, 26 Mar 2014 23:14:07 +0000 (16:14 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Fri, 28 Mar 2014 23:37:45 +0000 (16:37 -0700)
commitc6bbb95ce26e75214003190b643f5098e39b6428
treeddeebe963d1c6ded3112ddbb6625ed02eb28e884
parentcbfc0a5e33eb3d97a2995d120536b8dadc0cc0a2
syntax: Accept meta matchers in macros

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 #13067
src/libstd/comm/mod.rs
src/libstd/io/test.rs
src/libsyntax/ext/tt/macro_parser.rs
src/libsyntax/parse/attr.rs
src/libsyntax/parse/token.rs
src/test/compile-fail/macro-inner-attributes.rs
src/test/compile-fail/macro-outer-attributes.rs
src/test/run-pass/macro-attributes.rs
src/test/run-pass/macro-meta-items.rs [new file with mode: 0644]