Skip to content

Replace #[rustc_args_required_const(n)] with per-argument attr #69282

Description

@ecstatic-morse

RFC 2565, which was recently stabilized, allows individual function parameters to have attributes. One of the motivating examples for that RFC was the ugliness of #[rustc_args_required_const], which specifies the const argument(s) by index. We should transition away from #[rustc_args_required_const] to a per-argument attribute.

@petrochenkov has proposed #[rustc_required_const]. These attributes are perma-unstable so there are no backwards compatibility concerns.

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-attributesArea: Attributes (`#[…]`, `#![…]`)C-cleanupCategory: PRs that clean code up or issues documenting cleanup.C-enhancementCategory: An issue proposing an enhancement or a PR with one.E-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.F-param_attrs`#![feature(param_attrs)]`

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions