fn check_state_ref_param(env: &mut CompilationEnv, ty: &Type, struct_name: &Option<StructName>) {
    match &ty.value {
        Type_::Ref(_, state_ty) => {
            check_state_param(env, state_ty, struct_name);
        }
        _ => env.add_diag(diag!(
            Derivation::DeriveFailed,
            (ty.loc, "expected a reference type".to_string())
        )),
    }
}
/// Checks whether the type is a reference to the actor state.
Checks whether the type is a reference to the actor state.
Checks whether the type is a reference to the actor state .
fn check_state_ref_param(env: &mut CompilationEnv, ty: &Type, struct_name: &Option<StructName>) {
    match &ty.value {
        Type_::Ref(_, state_ty) => {
            check_state_param(env, state_ty, struct_name);
        }
        _ => env.add_diag(diag!(
            Derivation::DeriveFailed,
            (ty.loc, "expected a reference type".to_string())
        )),
    }
}
fn check_state_ref_param ( env : & mut CompilationEnv , ty : & Type , struct_name : & Option < StructName > ) { match & ty . value { Type_ :: Ref ( _ , state_ty ) => { check_state_param ( env , state_ty , struct_name ) ; } _ => env . add_diag ( diag ! ( Derivation DeriveFailed ( ty loc " " to_string ( ) ) ) ) , } }
Checks whether the type is a reference to the actor state.
Checks whether the type is a reference to the actor state .
env
&mut CompilationEnv
ty
&Type
struct_name
&Option<StructName>