fn check_is_empty_sig(sig: FnSig<'_>, self_kind: ImplicitSelfKind, len_output: LenOutput<'_>) -> bool {
    match &**sig.inputs_and_output {
        [arg, res] if len_output.matches_is_empty_output(res) => {
            matches!(
                (arg.kind(), self_kind),
                (ty::Ref(_, _, Mutability::Not), ImplicitSelfKind::ImmRef)
                    | (ty::Ref(_, _, Mutability::Mut), ImplicitSelfKind::MutRef)
            ) || (!arg.is_ref() && matches!(self_kind, ImplicitSelfKind::Imm | ImplicitSelfKind::Mut))
        },
        _ => false,
    }
}
/// Checks if the given signature matches the expectations for `is_empty`
Checks if the given signature matches the expectations for `is_empty`
Checks if the given signature matches the expectations for ` is_empty `
fn check_is_empty_sig(sig: FnSig<'_>, self_kind: ImplicitSelfKind, len_output: LenOutput<'_>) -> bool {
    match &**sig.inputs_and_output {
        [arg, res] if len_output.matches_is_empty_output(res) => {
            matches!(
                (arg.kind(), self_kind),
                (ty::Ref(_, _, Mutability::Not), ImplicitSelfKind::ImmRef)
                    | (ty::Ref(_, _, Mutability::Mut), ImplicitSelfKind::MutRef)
            ) || (!arg.is_ref() && matches!(self_kind, ImplicitSelfKind::Imm | ImplicitSelfKind::Mut))
        },
        _ => false,
    }
}
fn check_is_empty_sig ( sig : FnSig < ' _ > , self_kind : ImplicitSelfKind , len_output : LenOutput < ' _ > ) -> bool { match & * * sig . inputs_and_output { [ arg , res ] if len_output . matches_is_empty_output ( res ) => { matches ! ( ( arg kind ( ) self_kind ) ( ty Ref ( Mutability Not ) ImplicitSelfKind ImmRef ) ( ty Ref ( Mutability Mut ) ImplicitSelfKind MutRef ) ) || ( ! arg . is_ref ( ) && matches ! ( self_kind ImplicitSelfKind Imm ImplicitSelfKind Mut ) ) } , _ => false , } }
Checks if the given signature matches the expectations for `is_empty`
Checks if the given signature matches the expectations for ` is_empty `
sig
FnSig<'_>
self_kind
ImplicitSelfKind
len_output
LenOutput<'_>