RS.CLIPPY.CAST_ENUM_CONSTRUCTOR
Casts from an enum tuple constructor to an integer
This checker is a Clippy lint created by The Rust Project Contributors. The documentation shown here is a copy of the original documentation for: cast_enum_constructor. Copyright ©2025 The Rust Team. All rights reserved.
What it does
Checks for casts from an enum tuple constructor to an integer.
Why is this bad?
The cast is easily confused with casting a c-like enum value to an integer.
Example
enum E { X(i32) };
let _ = E::X as usize;