Closed
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.