rust/tests/rustdoc/macros.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
671 B
Rust
Raw Normal View History

//@ 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.
//@ 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) => {};
}
}