mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-04 03:07:25 +00:00
20 lines
285 B
Rust
20 lines
285 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;
|
|
});
|
|
}
|