-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-decl-macros-2-0Area: Declarative macros 2.0 (#39412)Area: Declarative macros 2.0 (#39412)C-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Hi.
I have a proc-macro that generates a macro_rules!
.
When I only do:
#[derive(MyCustomDerive)]
struct MyStruct {
}
I can use the generated macro.
However, if I add another custom derive like in:
#[derive(Serialize, MyCustomDerive)]
struct MyStruct {
}
I cannot use the macro anymore…
I get the error:
cannot find macro `my_macro!` in this scope
Strangely, if I do:
#[derive(MyCustomDerive, Serialize)]
struct MyStruct {
}
Putting the serde
custom derive after mine fix the issue.
I don't know if it is related to serde
or just a bug with multiple custom derives.
Thanks to fix this issue.
Metadata
Metadata
Assignees
Labels
A-decl-macros-2-0Area: Declarative macros 2.0 (#39412)Area: Declarative macros 2.0 (#39412)C-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.