1
Fork 0
rust/tests/ui/async-await/unnecessary-await.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
266 B
Rust
Raw Normal View History

// edition:2018
async fn foo () { }
2021-12-02 23:41:45 +00:00
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(())
}
2021-11-16 23:04:15 +00:00
fn main() {}