Skip to content

Include better example of attribute macro on Ch-19-06, and mention specific behaviour #2267

@saskenuba

Description

@saskenuba

At the section Attribute-like macros the implementation of the proc_derive_attribute macro should not be blank, showcasing the minimum functional example since args are parsed differently and it's shown the implementation of a simple derive at the section above it.

Moreover, it needs to be mentioned that an attribute macro replaces the "thing" they annotate (lost a ton of time in this yesterday).

https://doc.rust-lang.org/book/ch19-06-macros.html?highlight=proc_macro_at#attribute-like-macros

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions