Module enum_intrinsics_non_enums

Source

Structs§

EnumIntrinsicsNonEnums

Statics§

ENUM_INTRINSICS_NON_ENUMS πŸ”’
The enum_intrinsics_non_enums lint detects calls to intrinsic functions that require an enum (core::mem::discriminant, core::mem::variant_count), but are called with a non-enum type.

Functions§

enforce_mem_discriminant πŸ”’
enforce_mem_variant_count πŸ”’
is_non_enum πŸ”’
Returns true if we know for sure that the given type is not an enum. Note that for cases where the type is generic, we can’t be certain if it will be an enum so we have to assume that it is.