KK
Size: a a a
KK
Э
Э
KK
KK
Э
KK
KK
Э

Ct
KK
Ct
KK
Ct
KK
Ct
gen_tests!(impl_type). Пишешь#[cfg(feature = "slow")]
mod slow_tests {
gen_tests!(slow_impl1);
gen_tests!(slow_impl2);
}
Э
macro_rules test_impls {
($($test_name:ident | $t:ty ;)*) => {
$(
#[test]
fn $test_name() {
<$t as Trait>::trait_fn();
}
)*
};
}
test_impls! {
usize_test | usize;
isize_test | isize;
}Э
($( $(#[cfg($feature:tt)])? $test_name:ident | $t:ty ;)*) => { $( $(#[cfg($feature)])? fn $test_name() { … } )* };Э
test_impls! {
usize_test | usize;
isize_test | isize;
#[cfg(long_long_long)] u128_test | u128;
}