Closed
Description
Consider the following code (playground):
fn f() {
Debug!()
}
#[derive(Debug)]
struct S;
error: cannot find macro `Debug` in this scope
--> src/lib.rs:2:5
|
2 | Debug!()
| ^^^^^
This is not particularly helpful (in fact it's incorrect). Debug
is in scope, it's just not a macro rules macro. Instead the error should say something like
error: `Debug` is a derive macro, not a macro_rules! macro
--> src/lib.rs:2:5
|
2 | Debug!()
| ^^^^^ note: attempting to use a derive as a macro_rules! macro
Metadata
Metadata
Assignees
Labels
Area: Messages for errors, warnings, and lintsArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: Name/path resolution done by `rustc_resolve` specificallyDiagnostics: A diagnostic that is giving misleading or incorrect information.Call for participation: Medium difficulty. Experience needed to fix: Intermediate.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Relevant to the compiler team, which will review and decide on the PR/issue.