mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
Rollup merge of #122683 - tshepang:missing-test, r=Nadrieril
add missing test: expected paren or brace in macro
This commit is contained in:
commit
1eb49ec5b6
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…
Reference in New Issue
Block a user