rust/tests/ui/parser/attribute/attr-bad-meta-4.stderr
Nicholas Nethercote 8ac16c6193 Rewrite parse_meta_item.
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.
2024-03-21 10:16:09 +11:00

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