mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 04:57:19 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			20 lines
		
	
	
		
			369 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			369 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| //@ run-rustfix
 | |
| 
 | |
| struct S<T>(T);
 | |
| struct S2;
 | |
| 
 | |
| impl<T: Default> impl Default for S<T> {
 | |
|     //~^ ERROR: unexpected `impl` keyword
 | |
|     //~| HELP: remove the extra `impl`
 | |
|     fn default() -> Self { todo!() }
 | |
| }
 | |
| 
 | |
| impl impl Default for S2 {
 | |
|     //~^ ERROR: unexpected `impl` keyword
 | |
|     //~| HELP: remove the extra `impl`
 | |
|     fn default() -> Self { todo!() }
 | |
| }
 | |
| 
 | |
| 
 | |
| fn main() {}
 | 
