Skip to content

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

Closed

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.

Activity

  1. chriskrycho commented on Feb 25, 2025

    @chriskrycho
    Contributor

    Thanks for the report; this was fixed in #4241, which landed yesterday.

  2. matej-almasi commented on Feb 26, 2025

    @matej-almasi
    Author

    Great! Thanks for closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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