pub fn type_allowed_to_implement_copy<'tcx>(
    tcx: TyCtxt<'tcx>,
    param_env: ParamEnv<'tcx>,
    self_type: Ty<'tcx>,
    parent_cause: ObligationCause<'tcx>,
) -> Result<(), CopyImplementationError<'tcx>>
Expand description

Checks that the fields of the type (an ADT) all implement copy.

If fields don’t implement copy, return an error containing a list of those violating fields.

If it’s not an ADT, int ty, bool, float ty, char, raw pointer, !, a reference or an array returns Err(NotAnAdt).