-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
A-macromacro expansionmacro expansionS-actionableSomeone could pick this issue up and work on it right nowSomeone could pick this issue up and work on it right now
Description
In
#[derive(Derive)]
#[cfg_attr(never, derive(Clone))]
struct S {
#[cfg(never)]
invisible_field: u8,
#[cfg(not(never))]
visible_field: u8,
}
The Derive
macro should be passed the token stream corresponding to
struct S {
#[cfg(not(never))]
visible_field: u8,
}
Currently, we pass
#[cfg_attr(never, derive(Clone))]
struct S {
#[cfg(never)]
invisible_field: u8,
#[cfg(not(never))]
visible_field: u8,
}
Since we have to evalutate cfg
s to do this correctly, I propose moving the remove_derive_attrs
code to hir_expand
.
edwin0cheng, dunnock, ChayimFriedman2, Arjentix, appetrosyan and 4 more
Metadata
Metadata
Assignees
Labels
A-macromacro expansionmacro expansionS-actionableSomeone could pick this issue up and work on it right nowSomeone could pick this issue up and work on it right now