Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support suppressing default Clone derivation #325

Closed
mathstuf opened this issue Jun 27, 2024 · 1 comment
Closed

support suppressing default Clone derivation #325

mathstuf opened this issue Jun 27, 2024 · 1 comment

Comments

@mathstuf
Copy link
Contributor

I'd like to instead use perfect_derive(Clone) than derive(Clone). I can do the former with builder_struct_addr, but this conflicts with the derive(Clone) added by default. A direct dependency on perfect_derive seems excessive, but an escape hatch to do Clone in a different way would be nice.

mathstuf added a commit to mathstuf/rust-derive-builder that referenced this issue Jun 27, 2024
This attribute suppresses the default-generated `derive(Clone)`. This
may be necessary where `derive(Clone)` copies constraints in an
unsatisfiable way.

See: https://smallcultfollowing.com/babysteps//blog/2022/04/12/implied-bounds-and-perfect-derive/
See: rust-lang/rust#26925
Fixes: colin-kiegel#325
mathstuf added a commit to mathstuf/rust-derive-builder that referenced this issue Jun 27, 2024
This attribute suppresses the default-generated `derive(Clone)`. This
may be necessary where `derive(Clone)` copies constraints in an
unsatisfiable way.

See: https://smallcultfollowing.com/babysteps//blog/2022/04/12/implied-bounds-and-perfect-derive/
See: rust-lang/rust#26925
Fixes: colin-kiegel#325
mathstuf added a commit to mathstuf/rust-derive-builder that referenced this issue Jun 27, 2024
This attribute suppresses the default-generated `derive(Clone)`. This
may be necessary where `derive(Clone)` copies constraints in an
unsatisfiable way.

See: https://smallcultfollowing.com/babysteps//blog/2022/04/12/implied-bounds-and-perfect-derive/
See: rust-lang/rust#26925
Fixes: colin-kiegel#325
mathstuf added a commit to mathstuf/rust-derive-builder that referenced this issue Jun 27, 2024
This attribute suppresses the default-generated `derive(Clone)`. This
may be necessary where `derive(Clone)` copies constraints in an
unsatisfiable way.

See: https://smallcultfollowing.com/babysteps//blog/2022/04/12/implied-bounds-and-perfect-derive/
See: rust-lang/rust#26925
Fixes: colin-kiegel#325
mathstuf added a commit to mathstuf/rust-derive-builder that referenced this issue Jun 27, 2024
This attribute suppresses the default-generated `derive(Clone)`. This
may be necessary where `derive(Clone)` copies constraints in an
unsatisfiable way.

See: https://smallcultfollowing.com/babysteps//blog/2022/04/12/implied-bounds-and-perfect-derive/
See: rust-lang/rust#26925
Fixes: colin-kiegel#325
mathstuf added a commit to mathstuf/rust-derive-builder that referenced this issue Jun 27, 2024
This attribute suppresses the default-generated `derive(Clone)`. This
may be necessary where `derive(Clone)` copies constraints in an
unsatisfiable way.

See: https://smallcultfollowing.com/babysteps//blog/2022/04/12/implied-bounds-and-perfect-derive/
See: rust-lang/rust#26925
Fixes: colin-kiegel#325
@mathstuf
Copy link
Contributor Author

Suppression is more reliable with pattern = "owned" instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant