Skip to content

Listing-20-34 uses the newly reserved "gen" keyword #4237

@matej-almasi

Description

@matej-almasi

URL to the section(s) of the book with this problem:
https://doc.rust-lang.org/nightly/book/ch20-05-macros.html#how-to-write-a-custom-derive-macro

Description of the problem:
Listing 20-34 uses "gen" as variable identifier, but "gen" is a keyword in 2024 edition.

Suggested fix:
Replace "gen" with another suitable identifier.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions