derive-where icon indicating copy to clipboard operation
derive-where copied to clipboard

Attribute proc-macro to simplify deriving standard and other traits with custom generic type bounds.

Results 11 derive-where issues
Sort by recently updated
recently updated
newest added

I just stumbled onto the fact that often it is useful to use [`std::any::type_name`](https://doc.rust-lang.org/1.76.0/std/any/fn.type_name.html) instead of just skipping fields when implementing `Debug`. Maybe something like: ```rust #[derive_where(Debug)] struct Test {...

enhancement

Just leaving this here in case it turns out we don't need this validation ...

This can be done by using [`syn::Error::new_spanned`](https://docs.rs/syn/latest/syn/struct.Error.html#method.new_spanned) instead.

These are code improvements or features that could be added in the future if demand is there: - [ ] Revive rust-lang/rust#51561, which would get rid of the `nightly` crate...

enhancement

We recently increased the MSRV from 1.34 to 1.57. It shouldn't be too hard to lower the MSRV again, but seeing that we don't actually know who needs it at...

This makes sure our `README` and documentation in `lib.rs` are in sync. I also added a `WRITE_README=1` environment variable to the test, so we can just update the `README` instead...

I didn't know this about Rust, but apparently you can't implement `Drop` unless the item you are implementing it for uses the same constraints, e.g. you can't specialize your `Drop`...

enhancement

Would it be possible to support serde derive macros (`Serialize` & `Deserialize`) in `derive-where`? Currently, if you put fields from associated types, you have to manually put `#[serde(bounds(serialize = "XXX:...

Sometimes, it's useful to derive `Clone` for types with fields that cannot be cloned, and need to be re-initialized: ```rust #[derive_where(Clone, Debug)] struct Foo { // Defaults to `Option::::default()` on...