mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 13:04:42 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			23 lines
		
	
	
		
			435 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			435 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| struct Header;
 | |
| struct EntryMetadata;
 | |
| struct Entry<A, B>(A, B);
 | |
| 
 | |
| trait Tr {
 | |
|     type EncodedKey;
 | |
|     type EncodedValue;
 | |
| }
 | |
| 
 | |
| fn test<C: Tr, R>(
 | |
|     // This APIT is long, however we shouldn't render the type name with a newline in it.
 | |
|     y: impl FnOnce(
 | |
|         &mut Header,
 | |
|         &mut [EntryMetadata],
 | |
|         &mut [Entry<C::EncodedKey, C::EncodedValue>]
 | |
|     ) -> R,
 | |
| ) {
 | |
|     let () = y;
 | |
|     //~^ ERROR mismatched types
 | |
| }
 | |
| 
 | |
| fn main() {}
 | 
