2016-08-03 00:55:01 +00:00
|
|
|
// @has macros/macro.my_macro.html //pre 'macro_rules! my_macro {'
|
2015-11-28 13:47:12 +00:00
|
|
|
// @has - //pre '() => { ... };'
|
2021-12-27 21:44:14 +00:00
|
|
|
// @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.
|
|
|
|
// @has macros/macro.my_sub_macro.html //pre 'macro_rules! my_sub_macro {'
|
|
|
|
// @has - //pre '() => { ... };'
|
2021-12-27 21:44:14 +00:00
|
|
|
// @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) => {};
|
|
|
|
}
|
|
|
|
}
|