mirror of
https://github.com/rust-windowing/winit.git
synced 2026-08-29 04:40:04 -04:00
Warn on exhaustive exported enums
Enable clippy::exhaustive_enums in every crate so new exported enums are either #[non_exhaustive] or explicitly allowed as a closed set.
This commit is contained in:
@@ -7,6 +7,12 @@
|
||||
//!
|
||||
//! [`winit`]: https://docs.rs/winit
|
||||
|
||||
// Every newly exported enum should either be `#[non_exhaustive]`, or carry an `#[allow]` of
|
||||
// this lint when the set of variants can never grow.
|
||||
// `clippy::exhaustive_structs` is deliberately not enabled: event structs must stay
|
||||
// constructible by the backend crates, which `#[non_exhaustive]` would forbid.
|
||||
#![warn(clippy::exhaustive_enums)]
|
||||
|
||||
#[macro_use]
|
||||
pub mod as_any;
|
||||
pub mod cursor;
|
||||
|
||||
Reference in New Issue
Block a user