debug_stub_derive
debug_stub_derive copied to clipboard
#[ignore] attribute for generics
Rust's built in Debug derive adds : Debug bounds for all generics. This can be unnecessarily restrictive, so it would be great to be able to omit those bounds.
Potential designs:
1. Attribute on the generics themselves
#[derive(DebugStub)]
struct MyStruct<#[debug(ignore)] U, #[debug(ignore)] E> {}
2. Attribute on the entire struct
#[derive(DebugStub)]
#[debug(ignore_generics)]
struct MyStruct<U, E> {}
3. Both
Support both. Struct-level attribute overrides generics-level attributes
I'd be up to implement this myself (debug_stub_derive could really help me out, example), although this repo seems to be abandoned... should I just fork?
Only approach 2 is viable because derive macros apparently don't support attributes on generics