mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-11-03 22:49:17 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			20 lines
		
	
	
		
			289 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			289 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
//@ aux-build:block-on.rs
 | 
						|
//@ aux-build:foreign.rs
 | 
						|
//@ edition:2021
 | 
						|
//@ build-pass
 | 
						|
 | 
						|
#![feature(async_closure)]
 | 
						|
 | 
						|
use std::future::Future;
 | 
						|
 | 
						|
extern crate block_on;
 | 
						|
extern crate foreign;
 | 
						|
 | 
						|
struct NoCopy;
 | 
						|
 | 
						|
fn main() {
 | 
						|
    block_on::block_on(async {
 | 
						|
        foreign::closure()().await;
 | 
						|
    });
 | 
						|
}
 |