mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 13:04:42 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			16 lines
		
	
	
		
			321 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			321 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| trait Foo<T> {
 | |
|     fn foo(self, f: impl FnOnce());
 | |
| }
 | |
| 
 | |
| impl<T> Foo<T> for () {
 | |
|     fn foo(self, f: impl FnOnce()) {
 | |
|         f()
 | |
|     }
 | |
| }
 | |
| 
 | |
| fn main() {
 | |
|     // FIXME: This should ideally use a fully qualified path
 | |
|     // without mentioning the generic arguments of `foo`.
 | |
|     ().foo(|| ()) //~ ERROR type annotations needed
 | |
| }
 | 
