You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clippy struggles a bit with code generated by derive macros. It currently detects some enum generated by #[derive(TypedBuilder)], if clippy::exhaustive_enums is enabled.
Reproducer:
#![warn(clippy::exhaustive_enums)]
use typed_builder::TypedBuilder;
#[derive(TypedBuilder)]
pub struct Bar {
pub a: i32,
pub b: String,
}
Now run cargo clippy
Fix
The easiest fix would probably be to generate a #[allow(clippy::exhaustive_enums)] above the enum. That would simply suppress the lint for this specific enum. For my use case, it's totally fine, that the enum is non_exhaustive.
The text was updated successfully, but these errors were encountered:
Clippy struggles a bit with code generated by derive macros. It currently detects some enum generated by
#[derive(TypedBuilder)]
, ifclippy::exhaustive_enums
is enabled.Reproducer:
Now run
cargo clippy
Fix
The easiest fix would probably be to generate a
#[allow(clippy::exhaustive_enums)]
above the enum. That would simply suppress the lint for this specific enum. For my use case, it's totally fine, that the enum is non_exhaustive.The text was updated successfully, but these errors were encountered: