derive_more icon indicating copy to clipboard operation
derive_more copied to clipboard

Exposing macros for reuse

Open Porges opened this issue 1 year ago • 4 comments
trafficstars

It'd be really handy to be able to reuse some of the derive_more macros, for example I'd like to be able to reuse the display-like formatting in my own macros so I can utilize them in something like this without reimplementing it from scratch (and also for consistency with e.g. #[derive(derive_more::Display)]):

#[derive(Error)]
struct SomeErr {
    #[error(label = "this should be greater than {target}")]
    span: Span,

    target: usize,
}

Is this something that's been considered?

Porges avatar Aug 30 '24 01:08 Porges