fn generate_non_associated_fn(
    original_function: ItemFn,
    new_signature: Signature,
    doc_string: String,
) -> TokenStream {
    let visibility = &original_function.vis;
    let arguments = new_signature.inputs.iter().map(pattern_from_arg);
    let original_identifier = &original_function.sig.ident;

    let tokens = quote! {
        #original_function

        #[doc = #doc_string]
        #visibility #new_signature {
            !#original_identifier(#(#arguments),*)
        }
    };

    tokens.into()
}
/// Generates a negated function, where this function is
/// not associated.
///
/// # Examples
/// ```rust
/// use negate::negate;
/// #[negate]
/// fn is_even(x: i32) -> bool {
///     x % 2 == 0
/// }
/// // `is_not_even` was generated
/// assert!(is_not_even(3));
/// ```
Generates a negated function, where this function is
not associated.
Generates a negated function where this function is not associated .
fn generate_non_associated_fn(
    original_function: ItemFn,
    new_signature: Signature,
    doc_string: String,
) -> TokenStream {
    let visibility = &original_function.vis;
    let arguments = new_signature.inputs.iter().map(pattern_from_arg);
    let original_identifier = &original_function.sig.ident;
    let tokens = quote! {
        #original_function
        #[doc = #doc_string]
        #visibility #new_signature {
            !#original_identifier(#(#arguments),*)
        }
    };
    tokens.into()
}
fn generate_non_associated_fn ( original_function : ItemFn , new_signature : Signature , doc_string : String , ) -> TokenStream { let visibility = & original_function . vis ; let arguments = new_signature . inputs . iter ( ) . map ( pattern_from_arg ) ; let original_identifier = & original_function . sig . ident ; let tokens = quote ! { original_function [ doc doc_string ] visibility new_signature { original_identifier ( ( arguments ) ) } } ; tokens . into ( ) }
Generates a negated function, where this function is
not associated.
Generates a negated function where this function is not associated .
original_function
ItemFn
new_signature
Signature
doc_string
String
examples
```rust
use negate::negate.
` ` ` rust use negate :: negate .
[negate]
None