syntax: Do not accidentally treat multi-segment meta-items as single-segment
This commit is contained in:
parent
e2009ea5ff
commit
8371caf5ee
29 changed files with 236 additions and 213 deletions
|
|
@ -31,7 +31,7 @@ pub fn foo5(input: TokenStream) -> TokenStream { input }
|
|||
pub fn foo6(input: TokenStream) -> TokenStream { input }
|
||||
|
||||
#[proc_macro_derive(m::d7)]
|
||||
//FIXME ERROR: must only be one word
|
||||
//~^ ERROR: must only be one word
|
||||
pub fn foo7(input: TokenStream) -> TokenStream { input }
|
||||
|
||||
#[proc_macro_derive(d8(a))]
|
||||
|
|
@ -64,7 +64,7 @@ pub fn foo13(input: TokenStream) -> TokenStream { input }
|
|||
pub fn foo14(input: TokenStream) -> TokenStream { input }
|
||||
|
||||
#[proc_macro_derive(d15, attributes(m::a))]
|
||||
//FIXME ERROR: must only be one word
|
||||
//~^ ERROR: must only be one word
|
||||
pub fn foo15(input: TokenStream) -> TokenStream { input }
|
||||
|
||||
#[proc_macro_derive(d16, attributes(a(b)))]
|
||||
|
|
|
|||
|
|
@ -22,6 +22,12 @@ error: must only be one word
|
|||
LL | #[proc_macro_derive(d6 = "")]
|
||||
| ^^^^^^^
|
||||
|
||||
error: must only be one word
|
||||
--> $DIR/attribute.rs:33:21
|
||||
|
|
||||
LL | #[proc_macro_derive(m::d7)]
|
||||
| ^^^^^
|
||||
|
||||
error: must only be one word
|
||||
--> $DIR/attribute.rs:37:21
|
||||
|
|
||||
|
|
@ -64,6 +70,12 @@ error: must only be one word
|
|||
LL | #[proc_macro_derive(d14, attributes(a = ""))]
|
||||
| ^^^^^^
|
||||
|
||||
error: must only be one word
|
||||
--> $DIR/attribute.rs:66:37
|
||||
|
|
||||
LL | #[proc_macro_derive(d15, attributes(m::a))]
|
||||
| ^^^^
|
||||
|
||||
error: must only be one word
|
||||
--> $DIR/attribute.rs:70:37
|
||||
|
|
||||
|
|
@ -82,5 +94,5 @@ error: attribute must be of the form `#[proc_macro_derive(TraitName, /*opt*/ att
|
|||
LL | #[proc_macro_derive = ""]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 14 previous errors
|
||||
error: aborting due to 16 previous errors
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue