]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.rs
Rollup merge of #106751 - clubby789:const-intrinsic, r=GuillaumeGomez
[rust.git] / tests / ui / suggestions / async-fn-ctor-passed-as-arg-where-it-should-have-been-called.rs
1 // edition:2018
2 #![feature(async_closure)]
3 use std::future::Future;
4
5 async fn foo() {}
6
7 fn bar(f: impl Future<Output=()>) {}
8
9 fn main() {
10     bar(foo); //~ERROR E0277
11     let async_closure = async || ();
12     bar(async_closure); //~ERROR E0277
13 }