pub fn type_allowed_to_implement_const_param_ty<'tcx>(
tcx: TyCtxt<'tcx>,
param_env: ParamEnv<'tcx>,
self_type: Ty<'tcx>,
lang_item: LangItem,
parent_cause: ObligationCause<'tcx>,
) -> Result<(), ConstParamTyImplementationError<'tcx>>
Expand description
Checks that the fields of the type (an ADT) all implement (Unsized?)ConstParamTy
.
If fields don’t implement (Unsized?)ConstParamTy
, return an error containing a list of
those violating fields.
If it’s not an ADT, int ty, bool
or char
, returns Err(NotAnAdtOrBuiltinAllowed)
.