mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-29 20:15:27 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			17 lines
		
	
	
		
			183 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			183 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| //@ run-pass
 | |
| macro_rules! make_foo {
 | |
|     () => (
 | |
|         struct Foo;
 | |
| 
 | |
|         impl Foo {
 | |
|             fn bar(&self) {}
 | |
|         }
 | |
|     )
 | |
| }
 | |
| 
 | |
| make_foo!();
 | |
| 
 | |
| pub fn main() {
 | |
|     Foo.bar()
 | |
| }
 | 
