JelteF / derive_more

Some more derive(Trait) options
MIT License
1.68k stars 117 forks source link

Deriving Display on never gives a warning #400

Closed ndmitchell closed 2 weeks ago

ndmitchell commented 3 weeks ago

I have a type:

#[derive(Display)]
pub struct NoHash(!);

When I moved from derive_more 0.99.17 to 1.0.0 this went from not showing any warnings, to showing a warning about having dead code. I think this is because warnings are now turned on for generated derive_more code (which is great), but you might want to special case the never type in some way, or turn off dead_code because never produces it.

tyranron commented 2 weeks ago

@ndmitchell

#[derive(std::Debug)]
pub struct NoHash(!);

also produces it.