Closed
Description
I have an enum similar to the following:
enum State {
/// Temporary value to use in place of uninitialized memory, for safe handling of panics
#[doc(hidden)]
_Ephemeral,
Uninit(...),
Init(...),
}
Clippy suggests that I remove the _Ephemeral
variant in place of #[non_exhaustive]
, which wouldn't work in this case as _Ephemeral
is used, so removing it would be an error. I think the lint should only complain if the variant isn't actually used?
cargo clippy -V
clippy 0.0.212 (feb3536 2020-06-09)
Thanks!