macro_rules! check {
($m:ident => $($(#[doc = $doc:expr])?$name:ident$((passes: $($($pass:literal);*),* fails: $($($fail:literal);*),*))?: |$($param:ident$(, $(_$unused:tt)?)?)+| $check:expr)*) => { ... };
}Expand description
Defines a new check, and also generates docs/tests for example input of the check.
Example:
#![feature(generic_const_exprs)]
checks::check! { u8 =>
/// Matches all binary numbers (0, 1)
Binary(
passes: 0, 1
fails: 2, 3, 4
): |N| (N == 0 || N == 1)
}