rust-derivative
rust-derivative copied to clipboard
A set of alternative `derive` attributes for Rust
This was introduced in rust 1.73. I'm not sure if this is the right spot to report this. I figure it was better here since this isn't a part of...
rustc wants to use derivative to simplify `PartialEq` derives, but encounters a pretty [significant perf hit](https://github.com/rust-lang/rust/pull/117408#issuecomment-1786120320) because the `derivative(PartialEq)` impl will add a discriminant comparison first, unlike our hand-rolled implementations....
Fixes #112 To test this, one could increase the rust version in the `clippy` job of the `main` workflow. Not sure if that should be part of this pull request.
Use case: ```rust #[derive(Derivative)] #[derivative(Debug, Default, Clone)] pub struct FooConfig { bar: bool, _c: PhantomData, } #[derive(Derivative)] #[derivative(Debug(bound = ""), Clone(bound = ""), Default(bound = ""))] pub struct Foo {...
**Describe the bug** `Derivative` proc-macro triggers clippy lint https://rust-lang.github.io/rust-clippy/master/index.html#/incorrect_clone_impl_on_copy_type on the latest nightly. ``` error: incorrect implementation of `clone` on a `Copy` type --> src/lib.rs:4:10 | 4 | #[derive(Derivative)] |...
**Describe the bug** The following code will fail to derive. **To Reproduce** ```rust use derivative::*; #[derive(Derivative, Debug)] #[derivative(Clone(bound = ""), Copy(bound = ""))] pub struct T
**Describe the bug** For the `Clone` trait (I haven't tried other traits), `derivative` will impl `Clone` on a type even if one of its members doesn't and instead just has...
It has been a few years since the last release, and 'syn' a has received a major update. This is a not a bug, but a request for maintenance. Many...