rust/src/test/ui/async-await/unnecessary-await.rs

15 lines
268 B
Rust
Raw Normal View History

// 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(())
}
2021-11-16 23:04:15 +00:00
fn main() {}