JelteF / derive_more

Some more derive(Trait) options
MIT License
1.74k stars 123 forks source link

Add `#[allow(unreachable_code)]` to generated impls for `!` type #404

Closed tyranron closed 2 months ago

tyranron commented 2 months ago

Resolves #400

Synopsis

For ! never type used in trait signatures, rustc emits unreachable_code warning ignoring the #[automatically_derived] attribute.

Solution

Add #[allow(unreachable_code)] to generated impls to suppress such warnings for ! and similar types.

Checklist