mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 04:57:19 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			15 lines
		
	
	
		
			443 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			443 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| //@ compile-flags: -Zverbose-internals
 | |
| //@ edition:2021
 | |
| 
 | |
| #![feature(async_closure)]
 | |
| 
 | |
| fn main() {
 | |
|     let x = async || {};
 | |
|     //~^ NOTE the expected `async` closure body
 | |
|     let () = x();
 | |
|     //~^ ERROR mismatched types
 | |
|     //~| NOTE this expression has type `{static main::{closure#0}::{closure#0}<
 | |
|     //~| NOTE expected `async` closure body, found `()`
 | |
|     //~| NOTE expected `async` closure body `{static main::{closure#0}::{closure#0}<
 | |
| }
 | 
