]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/suggestions/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.rs
New upstream version 1.41.1+dfsg1
[rustc.git] / src / test / ui / suggestions / async-fn-ctor-passed-as-arg-where-it-should-have-been-called.rs
index a2d2ba145bc5efcd4dd2ef2a209e7de3acfd2dc7..156162c9027c318a89675aabf092739df0a218aa 100644 (file)
@@ -1,4 +1,5 @@
 // edition:2018
+#![feature(async_closure)]
 use std::future::Future;
 
 async fn foo() {}
@@ -7,4 +8,6 @@ fn bar(f: impl Future<Output=()>) {}
 
 fn main() {
     bar(foo); //~ERROR E0277
+    let async_closure = async || ();
+    bar(async_closure); //~ERROR E0277
 }