macro_rules! prefix_items {
(
$({$map:path})?
($($prefix:tt)*)
{$($item:item)*}
) => { ... };
}Expand description
Prefixes tokens to items.
This is a convenience wrapper around prefix! for use with items. It takes the same arguments
as prefix!, but transforms each item given into an individual token group.
prefix_items! {
(
#[cfg(feature = "foo")]
)
{
fn foo() {}
fn bar() {}
fn baz() {}
}
}
// Expands to:
// #[cfg(feature = "foo")]
// fn foo() {}
// #[cfg(feature = "foo")]
// fn bar() {}
// #[cfg(feature = "foo")]
// fn baz() {}