You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This introduces a new assist that adds the derive attributes from a struct or enum to the types of
its fields, recursively. It is recursive in the sense that the fields of field types are also
considered.
The derive attributes will be copied over if the field type meets the following criteria:
* It resides within the same workspace as the "top-level" type, to avoid editing the crate registry.
* It does not already have the same derive attribute.
* It does not have a manual implementation of the trait.
The last criteria is a bit of a guess since it isn't possible to know what trait implementation(s) a
derive macro generates. If a trait has the same name as the derive macro and the top-level type
(which already has the derive attribute) implements it, it'll be used to check for manual impls.
This seems to work well in practice.
0 commit comments