2024-06-21 12:03:08 +00:00
|
|
|
//@ has macros/macro.my_macro.html //pre 'macro_rules! my_macro {'
|
|
|
|
//@ has - //pre '() => { ... };'
|
|
|
|
//@ has - //pre '($a:tt) => { ... };'
|
|
|
|
//@ has - //pre '($e:expr) => { ... };'
|
2015-11-28 13:47:12 +00:00
|
|
|
#[macro_export]
|
|
|
|
macro_rules! my_macro {
|
|
|
|
() => [];
|
|
|
|
($a:tt) => ();
|
|
|
|
($e:expr) => {};
|
|
|
|
}
|
2020-12-28 21:01:05 +00:00
|
|
|
|
|
|
|
// Check that exported macro defined in a module are shown at crate root.
|
2024-06-21 12:03:08 +00:00
|
|
|
//@ has macros/macro.my_sub_macro.html //pre 'macro_rules! my_sub_macro {'
|
|
|
|
//@ has - //pre '() => { ... };'
|
|
|
|
//@ has - //pre '($a:tt) => { ... };'
|
|
|
|
//@ has - //pre '($e:expr) => { ... };'
|
2020-12-28 21:01:05 +00:00
|
|
|
mod sub {
|
|
|
|
#[macro_export]
|
|
|
|
macro_rules! my_sub_macro {
|
|
|
|
() => {};
|
|
|
|
($a:tt) => {};
|
|
|
|
($e:expr) => {};
|
|
|
|
}
|
|
|
|
}
|