-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)A-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTB-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCF-extended_key_value_attributes`#![feature(extended_key_value_attributes)]`#![feature(extended_key_value_attributes)]T-langRelevant to the language teamRelevant to the language team
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.
schneiderfelipeschneiderfelipeConnorGray, kangalio, DianaNites, timvisee, mashharuki and 1 morekangalio and schneiderfelipeschneiderfelipe
Metadata
Metadata
Assignees
Labels
A-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)A-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTB-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCF-extended_key_value_attributes`#![feature(extended_key_value_attributes)]`#![feature(extended_key_value_attributes)]T-langRelevant to the language teamRelevant to the language team