pub fn const_lit_matches_ty<'tcx>( tcx: TyCtxt<'tcx>, kind: &LitKind, ty: Ty<'tcx>, neg: bool, ) -> bool
Checks whether a literal can be interpreted as a const of the given type.