You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Incorrect span when encountering incorrect opening delimiter in macro fragments #55322
A-diagnosticsArea: Messages for errors, warnings, and lintsA-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)C-enhancementCategory: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
When writing a macro rule that tries to accept a () after a path, we correctly inform the user that ( cannot come after a path, but we point at the following character:
error: `$p:path` is followed by `(`, which is not allowed for `path` fragments
--> $DIR/macro-follow.rs:104:15
|
LL | ($p:path ()) => {};
| ^
This is probably an off-by-one error in the span assignment of the tokens.
error: `$p:path` is followed by `(`, which is not allowed for `path` fragments
--> src/lib.rs:2:14
|
2 | ($p:path ()) => {};
| ^ not allowed after `path` fragments
|
= note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where`
A-diagnosticsArea: Messages for errors, warnings, and lintsA-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)C-enhancementCategory: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
Activity
estebank commentedon Aug 30, 2020
Fixed: