mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-18 03:25:55 +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;
|
|
});
|
|
}
|