Suggested fix for "cannot find macro ...
in this scope" does not compile
#136140
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-macros
Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
C-bug
Category: This is a bug.
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.
I tried this code: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=a095133990477eb48c9b42343e5593f4
I expected to see this happen: Using a suggestion "just works".
Instead, this happened: Unexpected and even more confusing error message caused because of #98291.
Meta
Tested on playground with
1.84.0
(stable) and1.86.0-nightly (2025-01-26 f85c6de55206dbee5ffe)
.The text was updated successfully, but these errors were encountered: