mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 13:04:42 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			8 lines
		
	
	
		
			281 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			8 lines
		
	
	
		
			281 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| // Test that we report an error for unused type parameters in types.
 | |
| 
 | |
| struct SomeStruct<'a> { x: u32 } //~ ERROR parameter `'a` is never used
 | |
| enum SomeEnum<'a> { Nothing } //~ ERROR parameter `'a` is never used
 | |
| trait SomeTrait<'a> { fn foo(&self); } // OK on traits.
 | |
| 
 | |
| fn main() {}
 | 
