]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/async_yields_async.rs
Auto merge of #6336 - giraffate:sync-from-rust, r=flip1995
[rust.git] / tests / ui / async_yields_async.rs
index 898fe1a95613cd1cce35777ab6239ec047dbf352..731c094edb42b16b7a8488293fb09affc43d92db 100644 (file)
@@ -22,6 +22,12 @@ fn custom_future_type_ctor() -> CustomFutureType {
     CustomFutureType
 }
 
+async fn f() -> CustomFutureType {
+    // Don't warn for functions since you have to explicitly declare their
+    // return types.
+    CustomFutureType
+}
+
 #[rustfmt::skip]
 fn main() {
     let _f = {
@@ -58,4 +64,5 @@ fn main() {
         CustomFutureType
     };
     let _n = async || custom_future_type_ctor();
+    let _o = async || f();
 }