parent
d4f880f8ce
commit
d25c8a8ade
3 changed files with 29 additions and 4 deletions
7
tests/ui/macros/reparse-expr-issue-139495.rs
Normal file
7
tests/ui/macros/reparse-expr-issue-139495.rs
Normal file
|
@ -0,0 +1,7 @@
|
|||
macro_rules! m {
|
||||
($abi : expr) => { extern $abi } //~ ERROR expected expression, found keyword `extern`
|
||||
}
|
||||
|
||||
fn main() {
|
||||
m!(-2)
|
||||
}
|
13
tests/ui/macros/reparse-expr-issue-139495.stderr
Normal file
13
tests/ui/macros/reparse-expr-issue-139495.stderr
Normal file
|
@ -0,0 +1,13 @@
|
|||
error: expected expression, found keyword `extern`
|
||||
--> $DIR/reparse-expr-issue-139495.rs:2:22
|
||||
|
|
||||
LL | ($abi : expr) => { extern $abi }
|
||||
| ^^^^^^ expected expression
|
||||
...
|
||||
LL | m!(-2)
|
||||
| ------ in this macro invocation
|
||||
|
|
||||
= note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue