mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-30 20:44:34 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			16 lines
		
	
	
		
			360 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			360 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| //@ edition:2018
 | |
| //@ revisions: current next
 | |
| //@ ignore-compare-mode-next-solver (explicit revisions)
 | |
| //@[next] compile-flags: -Znext-solver
 | |
| //@ check-pass
 | |
| 
 | |
| #![feature(unboxed_closures, async_fn_traits)]
 | |
| 
 | |
| use std::ops::AsyncFn;
 | |
| 
 | |
| fn project<F: AsyncFn<()>>(_: F) -> Option<F::Output> { None }
 | |
| 
 | |
| fn main() {
 | |
|     let x: Option<i32> = project(|| async { 1i32 });
 | |
| }
 | 
