diff options
Diffstat (limited to 'tests/ui/macros/macro-doc-comments.rs')
-rw-r--r-- | tests/ui/macros/macro-doc-comments.rs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/ui/macros/macro-doc-comments.rs b/tests/ui/macros/macro-doc-comments.rs new file mode 100644 index 000000000..fcc64cc06 --- /dev/null +++ b/tests/ui/macros/macro-doc-comments.rs @@ -0,0 +1,26 @@ +// run-pass +#![allow(non_snake_case)] + +macro_rules! doc { + ( + $(#[$outer:meta])* + mod $i:ident { + $(#![$inner:meta])* + } + ) => + ( + $(#[$outer])* + pub mod $i { + $(#![$inner])* + } + ) +} + +doc! { + /// Outer doc + mod Foo { + //! Inner doc + } +} + +fn main() { } |