mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 13:04:42 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			10 lines
		
	
	
		
			218 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			10 lines
		
	
	
		
			218 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| //@ edition:2021
 | |
| 
 | |
| #![feature(async_closure)]
 | |
| 
 | |
| fn main() {
 | |
|     fn needs_fn(x: impl FnOnce()) {}
 | |
|     needs_fn(async || {});
 | |
|     //~^ ERROR expected `{async closure@is-not-fn.rs:7:14}` to be a closure that returns `()`
 | |
| }
 | 
