Closed
Description
Implemented in #78837.
With this feature arbitrary expressions are supported in values of key-value attributes at parse time.
#[my_attr = EXPR]
Previously only unsuffixed literals and interpolated expressions ($expr
) were accepted.
If the attribute in question survives expansion, then the value is still restricted to unsuffixed literals by a semantic check. This restriction may also be relaxed in the future.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
Area: Attributes (`#[…]`, `#![…]`)Area: The parsing of Rust source code to an ASTBlocker: Implemented in the nightly compiler and unstable.Category: A tracking issue for an RFC or an unstable feature.`#![feature(extended_key_value_attributes)]Relevant to the language team, which will review and decide on the PR/issue.