Skip to content

Commit abef2ed

Browse files
committed
Add rustdoc test.
1 parent 59f1ccd commit abef2ed

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/test/rustdoc/macros.rs

+14
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,17 @@ macro_rules! my_macro {
88
($a:tt) => ();
99
($e:expr) => {};
1010
}
11+
12+
// Check that exported macro defined in a module are shown at crate root.
13+
// @has macros/macro.my_sub_macro.html //pre 'macro_rules! my_sub_macro {'
14+
// @has - //pre '() => { ... };'
15+
// @has - //pre '($a:tt) => { ... };'
16+
// @has - //pre '($e:expr) => { ... };'
17+
mod sub {
18+
#[macro_export]
19+
macro_rules! my_sub_macro {
20+
() => {};
21+
($a:tt) => {};
22+
($e:expr) => {};
23+
}
24+
}

0 commit comments

Comments
 (0)