diff options
| author | Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> | 2022-11-12 23:18:32 +0100 |
|---|---|---|
| committer | Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> | 2022-11-14 19:59:15 +0100 |
| commit | 7e7c11cf560527c4a7c70da63455cc23f4c51235 (patch) | |
| tree | a6dcad97396a59b48fe6ba0b77dd268f90ef8d0b /src/test/ui/parser | |
| parent | 8ef2485bd59cad3674b9c7de29316c20d7ddc6e7 (diff) | |
Show a note where a macro failed to match
This shows a small note on what the macro matcher was currently processing to aid with "no rules expected the token X" errors.
Diffstat (limited to 'src/test/ui/parser')
| -rw-r--r-- | src/test/ui/parser/macro/macro-doc-comments-1.stderr | 6 | ||||
| -rw-r--r-- | src/test/ui/parser/macro/macro-doc-comments-2.stderr | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/test/ui/parser/macro/macro-doc-comments-1.stderr b/src/test/ui/parser/macro/macro-doc-comments-1.stderr index 0ebf3d52b63..eaeb62d2cfd 100644 --- a/src/test/ui/parser/macro/macro-doc-comments-1.stderr +++ b/src/test/ui/parser/macro/macro-doc-comments-1.stderr @@ -9,6 +9,12 @@ LL | //! Inner | | | no rules expected this token in macro call | inner doc comments expand to `#![doc = "..."]`, which is what this macro attempted to match + | +note: while trying to match `[` + --> $DIR/macro-doc-comments-1.rs:2:7 + | +LL | (#[$outer:meta]) => () + | ^ error: aborting due to previous error diff --git a/src/test/ui/parser/macro/macro-doc-comments-2.stderr b/src/test/ui/parser/macro/macro-doc-comments-2.stderr index 346d865868d..1dcd95f6fad 100644 --- a/src/test/ui/parser/macro/macro-doc-comments-2.stderr +++ b/src/test/ui/parser/macro/macro-doc-comments-2.stderr @@ -9,6 +9,12 @@ LL | /// Outer | | | no rules expected this token in macro call | outer doc comments expand to `#[doc = "..."]`, which is what this macro attempted to match + | +note: while trying to match `!` + --> $DIR/macro-doc-comments-2.rs:2:7 + | +LL | (#![$inner:meta]) => () + | ^ error: aborting due to previous error |
