diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-03-18 16:27:10 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-18 16:27:10 +0100 |
| commit | 1eb49ec5b689bd4bdd8e2c4e4da2de15b5251ef7 (patch) | |
| tree | e29cc26f7725bb3947f7b3bafbb4c2f729e5cfcd | |
| parent | 72e2c7c45a76acc8d803783db66016877d857d81 (diff) | |
| parent | 0550afd97e7d93e52249e83152d53f1facb3b823 (diff) | |
| download | rust-1eb49ec5b689bd4bdd8e2c4e4da2de15b5251ef7.tar.gz rust-1eb49ec5b689bd4bdd8e2c4e4da2de15b5251ef7.zip | |
Rollup merge of #122683 - tshepang:missing-test, r=Nadrieril
add missing test: expected paren or brace in macro
| -rw-r--r-- | tests/ui/macros/paren-or-brace-expected.rs | 9 | ||||
| -rw-r--r-- | tests/ui/macros/paren-or-brace-expected.stderr | 14 |
2 files changed, 23 insertions, 0 deletions
diff --git a/tests/ui/macros/paren-or-brace-expected.rs b/tests/ui/macros/paren-or-brace-expected.rs new file mode 100644 index 00000000000..1776fa78884 --- /dev/null +++ b/tests/ui/macros/paren-or-brace-expected.rs @@ -0,0 +1,9 @@ +macro_rules! foo { + ( $( $i:ident ),* ) => { + $[count($i)] + //~^ ERROR expected `(` or `{`, found `[` + //~| ERROR + }; +} + +fn main() {} diff --git a/tests/ui/macros/paren-or-brace-expected.stderr b/tests/ui/macros/paren-or-brace-expected.stderr new file mode 100644 index 00000000000..4d1dda97751 --- /dev/null +++ b/tests/ui/macros/paren-or-brace-expected.stderr @@ -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 + |
