mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 04:57:19 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			13 lines
		
	
	
		
			240 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			13 lines
		
	
	
		
			240 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| //@ build-fail
 | |
| //@ compile-flags: -Zpolymorphize=on
 | |
| #![crate_type = "lib"]
 | |
| #![feature(rustc_attrs)]
 | |
| 
 | |
| fn foo<'a>(_: &'a ()) {}
 | |
| 
 | |
| #[rustc_polymorphize_error]
 | |
| pub fn test<T>() {
 | |
|     //~^ ERROR item has unused generic parameters
 | |
|     foo(&());
 | |
| }
 | 
