//! Utility macros

/// Calls `macro` with all the parameters reducing the parameter count by 1 each time.
///
/// For example, `smaller_calls_too!(macro, A, B, C)` expands to
/// ```rs
/// macro!{A, B, C}
/// macro!{A, B}
/// macro!{A}
/// ```
#[macro_export]
macro_rules! smaller_calls_too {
    ($macro: ident, $next: tt) => {
        $macro!{$next}
    };
    ($macro: ident, $next: tt, $($rest: tt),*) => {
        $macro!{$next, $($rest),*}
        $crate::smaller_calls_too!{$macro, $($rest),*}
    }
}
