2016-08-02 19:55:01 -05:00
|
|
|
// @has macros/macro.my_macro.html //pre 'macro_rules! my_macro {'
|
2015-11-28 07:47:12 -06:00
|
|
|
// @has - //pre '() => { ... };'
|
2021-12-27 15:44:14 -06:00
|
|
|
// @has - //pre '($a:tt) => { ... };'
|
|
|
|
// @has - //pre '($e:expr) => { ... };'
|
2015-11-28 07:47:12 -06:00
|
|
|
#[macro_export]
|
|
|
|
macro_rules! my_macro {
|
|
|
|
() => [];
|
|
|
|
($a:tt) => ();
|
|
|
|
($e:expr) => {};
|
|
|
|
}
|
2020-12-28 15:01:05 -06: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 15:44:14 -06:00
|
|
|
// @has - //pre '($a:tt) => { ... };'
|
|
|
|
// @has - //pre '($e:expr) => { ... };'
|
2020-12-28 15:01:05 -06:00
|
|
|
mod sub {
|
|
|
|
#[macro_export]
|
|
|
|
macro_rules! my_sub_macro {
|
|
|
|
() => {};
|
|
|
|
($a:tt) => {};
|
|
|
|
($e:expr) => {};
|
|
|
|
}
|
|
|
|
}
|