Suggestions are often invalid for proc-macro produced code #85932
Labels
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
D-confusing
Diagnostics: Confusing error or lint that should be reworked.
D-invalid-suggestion
Diagnostics: A structured suggestion resulting in incorrect code.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
The tokens generated by proc_macro (e.g. from
quote!()
) useSpan::call_site()
, which makes some suggestions produce invalid output:It's a bit tricky, because this call_site span does point into the current crate (to
#[hello]
), so this situaiton isn't detected in the same way as externalmacro_rules
.The text was updated successfully, but these errors were encountered: