Function clippy_utils::consts::lit_to_mir_constant
source · pub fn lit_to_mir_constant<'tcx>(
lit: &LitKind,
ty: Option<Ty<'tcx>>
) -> Constant<'tcx>
Expand description
Parses a LitKind
to a Constant
.
pub fn lit_to_mir_constant<'tcx>(
lit: &LitKind,
ty: Option<Ty<'tcx>>
) -> Constant<'tcx>
Parses a LitKind
to a Constant
.