From abef2ed2bc212a7b69ee88c0ae0fd36e0d7c3c96 Mon Sep 17 00:00:00 2001 From: Camille GILLOT Date: Mon, 28 Dec 2020 22:01:05 +0100 Subject: [PATCH] Add rustdoc test. --- src/test/rustdoc/macros.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/test/rustdoc/macros.rs b/src/test/rustdoc/macros.rs index fb4f02ad16052..ae0cf7a14789d 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) => {}; + } +}