mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 06:51:58 +00:00
15 lines
266 B
Rust
15 lines
266 B
Rust
// edition:2018
|
|
|
|
async fn foo () { }
|
|
fn bar() -> impl std::future::Future { async {} }
|
|
fn boo() {}
|
|
|
|
async fn baz() -> std::io::Result<()> {
|
|
foo().await;
|
|
boo().await; //~ ERROR `()` is not a future
|
|
bar().await;
|
|
std::io::Result::Ok(())
|
|
}
|
|
|
|
fn main() {}
|