Skip to main content

const_lit_matches_ty

Function const_lit_matches_ty 

Source
pub fn const_lit_matches_ty<'tcx>(
    tcx: TyCtxt<'tcx>,
    kind: &LitKind,
    ty: Ty<'tcx>,
    neg: bool,
) -> bool
Expand description

Checks whether a literal can be interpreted as a const of the given type.