Skip to content

Original pin!() macro behavior cannot be expressed in Rust 2024 #138718

Description

@m-ou-se

See #138596

It looks like Rust 2024 regressed in expressivity. The exact original behavior of the pin!() macro cannot be expressed in Rust 2024.

As a temporary workaround for pin!() itself, #138717 adds #[rustc_macro_edition_2021].

Both #138622 (comment) and #138717 mention super let as the proper solution.

One could argue that pin!() cannot be expressed in any Rust edition, because it relies on an unstable public (hidden) field and #[allow_internal_unstable]. This problem is also solved by super let.

Activity

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

    A-edition-2024Area: The 2024 editionC-bugCategory: This is a bug.I-lang-radarItems that are on lang's radar and will need eventual work or consideration.T-langRelevant to the language team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions