clippy_utils::consts

Function 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.