Skip to content

Commit 1eb49ec

Browse files
authored
Rollup merge of #122683 - tshepang:missing-test, r=Nadrieril
add missing test: expected paren or brace in macro
2 parents 72e2c7c + 0550afd commit 1eb49ec

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
macro_rules! foo {
2+
( $( $i:ident ),* ) => {
3+
$[count($i)]
4+
//~^ ERROR expected `(` or `{`, found `[`
5+
//~| ERROR
6+
};
7+
}
8+
9+
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
error: expected `(` or `{`, found `[`
2+
--> $DIR/paren-or-brace-expected.rs:3:10
3+
|
4+
LL | $[count($i)]
5+
| ^^^^^^^^^^^
6+
7+
error: expected one of: `*`, `+`, or `?`
8+
--> $DIR/paren-or-brace-expected.rs:3:10
9+
|
10+
LL | $[count($i)]
11+
| ^^^^^^^^^^^
12+
13+
error: aborting due to 2 previous errors
14+

0 commit comments

Comments
 (0)