summaryrefslogtreecommitdiffstats
path: root/src/test/ui/async-await/unnecessary-await.rs
blob: 24673777b8039dd24bd54f963220920055248d60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// 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() {}