missing_fragment_specifier
points at the wrong span if followed by another metavariable
#129077
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-macros
Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
This:
Produces:
Notice for the second pattern, the diagnostic points at
$qux
rather than$baz
.$qux
is not a problem here, the span should look similar to$bar
.https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=11ae576f5ce6e77fbad782f6c013ba76
Tested on both 1.80 and the 2024-08-13 nightly. This affects the new diagnostic that applies to e2024 added in #128006, as well as the existing lint (I noticed it looking at the reports in #128425).
The text was updated successfully, but these errors were encountered: