]> git.lizzy.rs Git - rust.git/blob - tests/ui/async-await/unnecessary-await.rs
Rollup merge of #105641 - Amanieu:btree_cursor, r=m-ou-se
[rust.git] / tests / ui / async-await / unnecessary-await.rs
1 // edition:2018
2
3 async fn foo () { }
4 fn bar() -> impl std::future::Future { async {} }
5 fn boo() {}
6
7 async fn baz() -> std::io::Result<()> {
8     foo().await;
9     boo().await; //~ ERROR `()` is not a future
10     bar().await;
11     std::io::Result::Ok(())
12 }
13
14 fn main() {}