]> git.proxmox.com Git - rustc.git/blobdiff - tests/ui/suggestions/match-prev-arm-needing-semi.stderr
New upstream version 1.69.0+dfsg1
[rustc.git] / tests / ui / suggestions / match-prev-arm-needing-semi.stderr
index 8d735b71f827821b72db818d12fff85008c0fea3..cf3cf45ef402ae3883bba2c5b1575111f30ae214 100644 (file)
@@ -1,5 +1,5 @@
 error[E0308]: `match` arms have incompatible types
-  --> $DIR/match-prev-arm-needing-semi.rs:35:18
+  --> $DIR/match-prev-arm-needing-semi.rs:26:18
    |
 LL |       let _ = match true {
    |  _____________-
@@ -9,19 +9,17 @@ LL | |             async_dummy();
 LL | |
 LL | |         }
 LL | |         false => async_dummy(),
-   | |                  ^^^^^^^^^^^^^ expected `()`, found opaque type
+   | |                  ^^^^^^^^^^^^^ expected `()`, found future
 ...  |
 LL | |
 LL | |     };
    | |_____- `match` arms have incompatible types
    |
-note: while checking the return type of the `async fn`
-  --> $DIR/match-prev-arm-needing-semi.rs:16:24
+note: calling an async function returns a future
+  --> $DIR/match-prev-arm-needing-semi.rs:26:18
    |
-LL | async fn async_dummy() {}
-   |                        ^ checked the `Output` of this `async fn`, found opaque type
-   = note: expected unit type `()`
-            found opaque type `impl Future<Output = ()>`
+LL |         false => async_dummy(),
+   |                  ^^^^^^^^^^^^^
 help: consider `await`ing on the `Future`
    |
 LL |         false => async_dummy().await,
@@ -33,7 +31,7 @@ LL +             async_dummy()
    |
 
 error[E0308]: `match` arms have incompatible types
-  --> $DIR/match-prev-arm-needing-semi.rs:48:18
+  --> $DIR/match-prev-arm-needing-semi.rs:39:18
    |
 LL |       let _ = match true {
    |  _____________-
@@ -43,19 +41,17 @@ LL | |             async_dummy();
 LL | |
 LL | |         }
 LL | |         false => async_dummy2(),
-   | |                  ^^^^^^^^^^^^^^ expected `()`, found opaque type
+   | |                  ^^^^^^^^^^^^^^ expected `()`, found future
 ...  |
 LL | |
 LL | |     };
    | |_____- `match` arms have incompatible types
    |
-note: while checking the return type of the `async fn`
-  --> $DIR/match-prev-arm-needing-semi.rs:22:25
+note: calling an async function returns a future
+  --> $DIR/match-prev-arm-needing-semi.rs:39:18
    |
-LL | async fn async_dummy2() {}
-   |                         ^ checked the `Output` of this `async fn`, found opaque type
-   = note: expected unit type `()`
-            found opaque type `impl Future<Output = ()>`
+LL |         false => async_dummy2(),
+   |                  ^^^^^^^^^^^^^^
 help: consider `await`ing on the `Future`
    |
 LL |         false => async_dummy2().await,
@@ -69,7 +65,7 @@ LL ~         false => Box::new(async_dummy2()),
    |
 
 error[E0308]: `match` arms have incompatible types
-  --> $DIR/match-prev-arm-needing-semi.rs:59:18
+  --> $DIR/match-prev-arm-needing-semi.rs:50:18
    |
 LL |       let _ = match true {
    |  _____________-
@@ -77,24 +73,12 @@ LL | |         true => async_dummy(),
    | |                 ------------- this is found to be of type `impl Future<Output = ()>`
 LL | |
 LL | |         false => async_dummy2(),
-   | |                  ^^^^^^^^^^^^^^ expected opaque type, found a different opaque type
-...  |
+   | |                  ^^^^^^^^^^^^^^ expected future, found a different future
+LL | |
 LL | |
 LL | |     };
    | |_____- `match` arms have incompatible types
    |
-note: while checking the return type of the `async fn`
-  --> $DIR/match-prev-arm-needing-semi.rs:16:24
-   |
-LL | async fn async_dummy() {}
-   |                        ^ checked the `Output` of this `async fn`, expected opaque type
-note: while checking the return type of the `async fn`
-  --> $DIR/match-prev-arm-needing-semi.rs:22:25
-   |
-LL | async fn async_dummy2() {}
-   |                         ^ checked the `Output` of this `async fn`, found opaque type
-   = note: expected opaque type `impl Future<Output = ()>` (opaque type at <$DIR/match-prev-arm-needing-semi.rs:16:24>)
-              found opaque type `impl Future<Output = ()>` (opaque type at <$DIR/match-prev-arm-needing-semi.rs:22:25>)
    = note: distinct uses of `impl Trait` result in different opaque types
 help: consider `await`ing on both `Future`s
    |