It can't use `maybe_whole`, but it can match `maybe_whole` more closely. Also add a test for a case that wasn't previously covered.
26 lines
949 B
Plaintext
26 lines
949 B
Plaintext
error: expected unsuffixed literal or identifier, found `an(arbitrary token stream)`
|
|
--> $DIR/attr-bad-meta-4.rs:3:15
|
|
|
|
|
LL | #[cfg($attr_item)]
|
|
| ^^^^^^^^^^
|
|
...
|
|
LL | mac!(an(arbitrary token stream));
|
|
| -------------------------------- in this macro invocation
|
|
|
|
|
= note: this error originates in the macro `mac` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error: expected unsuffixed literal or identifier, found `an(arbitrary token stream)`
|
|
--> $DIR/attr-bad-meta-4.rs:3:15
|
|
|
|
|
LL | #[cfg($attr_item)]
|
|
| ^^^^^^^^^^
|
|
...
|
|
LL | mac!(an(arbitrary token stream));
|
|
| -------------------------------- in this macro invocation
|
|
|
|
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
= note: this error originates in the macro `mac` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error: aborting due to 2 previous errors
|
|
|