add missing test: expected paren or brace in macro
This commit is contained in:
parent
13abc0ac9b
commit
0550afd97e
2 changed files with 23 additions and 0 deletions
9
tests/ui/macros/paren-or-brace-expected.rs
Normal file
9
tests/ui/macros/paren-or-brace-expected.rs
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
macro_rules! foo {
|
||||||
|
( $( $i:ident ),* ) => {
|
||||||
|
$[count($i)]
|
||||||
|
//~^ ERROR expected `(` or `{`, found `[`
|
||||||
|
//~| ERROR
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
fn main() {}
|
14
tests/ui/macros/paren-or-brace-expected.stderr
Normal file
14
tests/ui/macros/paren-or-brace-expected.stderr
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
error: expected `(` or `{`, found `[`
|
||||||
|
--> $DIR/paren-or-brace-expected.rs:3:10
|
||||||
|
|
|
||||||
|
LL | $[count($i)]
|
||||||
|
| ^^^^^^^^^^^
|
||||||
|
|
||||||
|
error: expected one of: `*`, `+`, or `?`
|
||||||
|
--> $DIR/paren-or-brace-expected.rs:3:10
|
||||||
|
|
|
||||||
|
LL | $[count($i)]
|
||||||
|
| ^^^^^^^^^^^
|
||||||
|
|
||||||
|
error: aborting due to 2 previous errors
|
||||||
|
|
Loading…
Add table
Reference in a new issue