mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 13:04:42 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			18 lines
		
	
	
		
			281 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			281 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| //@ check-pass
 | |
| //@ edition:2021
 | |
| 
 | |
| macro_rules! m {
 | |
|     () => {
 | |
|         trait MacroTrait {}
 | |
|         struct OutsideStruct;
 | |
|         fn my_func() {
 | |
|             impl MacroTrait for OutsideStruct {}
 | |
|             //~^ WARN non-local `impl` definition
 | |
|         }
 | |
|     }
 | |
| }
 | |
| 
 | |
| m!();
 | |
| 
 | |
| fn main() {}
 | 
