mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 21:16:44 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			27 lines
		
	
	
		
			345 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			345 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| //@ 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() { }
 | 
