Skip to content

Builtin deriving-generated attributes should be named better #49967

Closed
@Manishearth

Description

@Manishearth

Currently, these show up as __arg_0, etc in docs:

image

We should provide the ability for builtin derives to specify a string for each argument name, e.g. the args vector here (usage) would be a vector of tuples.

To fix this we also need to generate identifiers hygenically. Currently we generate __arg_0 so that it does not clash with other constants, but instead we should be doing something like ident_of("argumentname").gensym() which we then pass around.

(Ideally, we'd do the same for the other double underscored idents in the deriving code)

@zofrex is working on this

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)E-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions