-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)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 RFC
Description
This is a tracking issue for macro attributes that can observe output of the #[derive]
attribute.
This includes macro attributes on the same item as #[derive]
but below it, and macro attributes on nested nodes of the item with #[derive]
.
#[derive]
fully configures its input, eagerly evaluating cfg
s everywhere in its target, for example on fields.
Attributes expanded after the #[derive]
will see the item in this fully configured form, but we don't want expose it to them on stable channel for now.
Example:
#[derive(Trait)]
#[my_attr] // Gated
struct S1 {
field: [u8; 10],
}
#[derive(Trait)]
struct S2 {
field: [u8; #[my_attr] 10], // Gated
}
The feature name is macro_attributes_in_derive_output
.
The feature gate was introduced in #79078.
jyn514 and CGMossa
Metadata
Metadata
Assignees
Labels
A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)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 RFC