about summary refs log tree commit diff
path: root/src/test/ui/async-await/async-block-control-flow-static-semantics.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/async-await/async-block-control-flow-static-semantics.stderr')
-rw-r--r--src/test/ui/async-await/async-block-control-flow-static-semantics.stderr26
1 files changed, 16 insertions, 10 deletions
diff --git a/src/test/ui/async-await/async-block-control-flow-static-semantics.stderr b/src/test/ui/async-await/async-block-control-flow-static-semantics.stderr
index c36caa5586f..a9b0e7ae779 100644
--- a/src/test/ui/async-await/async-block-control-flow-static-semantics.stderr
+++ b/src/test/ui/async-await/async-block-control-flow-static-semantics.stderr
@@ -39,6 +39,22 @@ LL |     let _: &dyn Future<Output = ()> = &block;
               found type `()`
    = note: required for the cast to the object type `dyn std::future::Future<Output = ()>`
 
+error[E0308]: mismatched types
+  --> $DIR/async-block-control-flow-static-semantics.rs:22:58
+   |
+LL |   async fn return_targets_async_block_not_async_fn() -> u8 {
+   |  __________________________________________________________^
+LL | |
+LL | |     let block = async {
+LL | |         return 0u8;
+...  |
+LL | |
+LL | | }
+   | |_^ expected u8, found ()
+   |
+   = note: expected type `u8`
+              found type `()`
+
 error[E0271]: type mismatch resolving `<impl std::future::Future as std::future::Future>::Output == ()`
   --> $DIR/async-block-control-flow-static-semantics.rs:27:39
    |
@@ -49,16 +65,6 @@ LL |     let _: &dyn Future<Output = ()> = &block;
               found type `()`
    = note: required for the cast to the object type `dyn std::future::Future<Output = ()>`
 
-error[E0271]: type mismatch resolving `<impl std::future::Future as std::future::Future>::Output == u8`
-  --> $DIR/async-block-control-flow-static-semantics.rs:22:55
-   |
-LL | async fn return_targets_async_block_not_async_fn() -> u8 {
-   |                                                       ^^ expected (), found u8
-   |
-   = note: expected type `()`
-              found type `u8`
-   = note: the return type of a function must have a statically known size
-
 error[E0308]: mismatched types
   --> $DIR/async-block-control-flow-static-semantics.rs:48:44
    |