#[cfg_attr(feature = "nightly", doc = "```ignore")]
#[cfg_attr(not(feature = "nightly"), doc = "```")]
#[cfg_attr(feature = "nightly", doc = "```")]
#[cfg_attr(not(feature = "nightly"), doc = "```ignore")]
#[macro_export(local_inner_macros)]
macro_rules! assert_fields {
($($xs:tt)+) => { _assert_fields!($($xs)+); };
}
#[doc(hidden)]
#[cfg(feature = "nightly")]
#[macro_export(local_inner_macros)]
macro_rules! _assert_fields {
($t:path, $($f:ident),+) => {
#[allow(unknown_lints, unneeded_field_pattern)]
const _: fn() -> () = || {
$(let $t { $f: _, .. };)+
};
};
}
#[doc(hidden)]
#[cfg(not(feature = "nightly"))]
#[macro_export(local_inner_macros)]
macro_rules! _assert_fields {
($t:path, $($f:ident),+) => {
#[allow(unknown_lints, unneeded_field_pattern)]
{ $(let $t { $f: _, .. };)+ }
};
($label:ident; $($xs:tt)+) => {
#[allow(dead_code, non_snake_case)]
fn $label() { assert_fields!($($xs)+); }
};
}