rust/tests/ui/macros/reparse-expr-issue-139495.stderr
Nicholas Nethercote 6be270be0c Handle another negated literal in eat_token_lit.
Extends the change from #139653, which was on expressions, to literals.

Fixes #140098.
2025-04-22 15:08:32 +10:00

25 lines
798 B
Plaintext

error: expected expression, found keyword `extern`
--> $DIR/reparse-expr-issue-139495.rs:2:24
|
LL | ($abi: literal) => { extern $abi }
| ^^^^^^ expected expression
...
LL | m1!(-2)
| ------- in this macro invocation
|
= note: this error originates in the macro `m1` (in Nightly builds, run with -Z macro-backtrace for more info)
error: expected expression, found keyword `extern`
--> $DIR/reparse-expr-issue-139495.rs:6:21
|
LL | ($abi: expr) => { extern $abi }
| ^^^^^^ expected expression
...
LL | m2!(-2)
| ------- in this macro invocation
|
= note: this error originates in the macro `m2` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 2 previous errors