clippy_utils::ty

Function read_explicit_enum_value

Source
pub fn read_explicit_enum_value(tcx: TyCtxt<'_>, id: DefId) -> Option<EnumValue>
Expand description

Attempts to read the given constant as though it were an enum value.