diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2020-12-28 22:01:05 +0100 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2021-01-05 21:10:34 +0100 |
| commit | abef2ed2bc212a7b69ee88c0ae0fd36e0d7c3c96 (patch) | |
| tree | 1bca78f922a8b4997ce431b6ac90699096dc4fdc | |
| parent | 59f1ccd35ca57da4cef5740d61ecfe5ea52939d7 (diff) | |
| download | rust-abef2ed2bc212a7b69ee88c0ae0fd36e0d7c3c96.tar.gz rust-abef2ed2bc212a7b69ee88c0ae0fd36e0d7c3c96.zip | |
Add rustdoc test.
| -rw-r--r-- | src/test/rustdoc/macros.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/rustdoc/macros.rs b/src/test/rustdoc/macros.rs index fb4f02ad160..ae0cf7a1478 100644 --- a/src/test/rustdoc/macros.rs +++ b/src/test/rustdoc/macros.rs @@ -8,3 +8,17 @@ macro_rules! my_macro { ($a:tt) => (); ($e:expr) => {}; } + +// 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) => { ... };' +mod sub { + #[macro_export] + macro_rules! my_sub_macro { + () => {}; + ($a:tt) => {}; + ($e:expr) => {}; + } +} |
