Generic parameter definitions are not cfg-stripped before #[derive]
macros are invoked
#75930
Labels
A-attributes
Area: Attributes (`#[…]`, `#![…]`)
A-macros
Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)
A-proc-macros
Area: Procedural macros
C-bug
Category: This is a bug.
The following code (repository at https://github.com/Aaron1011/derive-bug):
produces the following output:
Note how all
#[cfg(FALSE)]
targets are stripped, except for the generic parameterT
. This seems quite inconsistent.Tested on
rustc 1.47.0-nightly (de521cbb3 2020-08-21)
The text was updated successfully, but these errors were encountered: