summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/if-then-neeing-semi.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:41 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:41 +0000
commit4f9fe856a25ab29345b90e7725509e9ee38a37be (patch)
treee4ffd8a9374cae7b21f7cbfb352927e0e074aff6 /tests/ui/suggestions/if-then-neeing-semi.stderr
parentAdding upstream version 1.68.2+dfsg1. (diff)
downloadrustc-upstream/1.69.0+dfsg1.tar.xz
rustc-upstream/1.69.0+dfsg1.zip
Adding upstream version 1.69.0+dfsg1.upstream/1.69.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/suggestions/if-then-neeing-semi.stderr')
-rw-r--r--tests/ui/suggestions/if-then-neeing-semi.stderr46
1 files changed, 15 insertions, 31 deletions
diff --git a/tests/ui/suggestions/if-then-neeing-semi.stderr b/tests/ui/suggestions/if-then-neeing-semi.stderr
index d7c5818ab..6833e0bab 100644
--- a/tests/ui/suggestions/if-then-neeing-semi.stderr
+++ b/tests/ui/suggestions/if-then-neeing-semi.stderr
@@ -1,5 +1,5 @@
error[E0308]: `if` and `else` have incompatible types
- --> $DIR/if-then-neeing-semi.rs:37:9
+ --> $DIR/if-then-neeing-semi.rs:28:9
|
LL | let _ = if true {
| _____________-
@@ -9,19 +9,17 @@ LL | | async_dummy();
LL | |
LL | | } else {
LL | | async_dummy()
- | | ^^^^^^^^^^^^^ expected `()`, found opaque type
+ | | ^^^^^^^^^^^^^ expected `()`, found future
... |
LL | |
LL | | };
| |_____- `if` and `else` have incompatible types
|
-note: while checking the return type of the `async fn`
- --> $DIR/if-then-neeing-semi.rs:18:24
+note: calling an async function returns a future
+ --> $DIR/if-then-neeing-semi.rs:28:9
|
-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 | async_dummy()
+ | ^^^^^^^^^^^^^
help: consider `await`ing on the `Future`
|
LL | async_dummy().await
@@ -33,7 +31,7 @@ LL + async_dummy()
|
error[E0308]: `if` and `else` have incompatible types
- --> $DIR/if-then-neeing-semi.rs:50:9
+ --> $DIR/if-then-neeing-semi.rs:41:9
|
LL | let _ = if true {
| _____________-
@@ -43,19 +41,17 @@ LL | | async_dummy();
LL | |
LL | | } else {
LL | | async_dummy2()
- | | ^^^^^^^^^^^^^^ expected `()`, found opaque type
+ | | ^^^^^^^^^^^^^^ expected `()`, found future
... |
LL | |
LL | | };
| |_____- `if` and `else` have incompatible types
|
-note: while checking the return type of the `async fn`
- --> $DIR/if-then-neeing-semi.rs:24:25
+note: calling an async function returns a future
+ --> $DIR/if-then-neeing-semi.rs:41:9
|
-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 | async_dummy2()
+ | ^^^^^^^^^^^^^^
help: consider `await`ing on the `Future`
|
LL | async_dummy2().await
@@ -69,7 +65,7 @@ LL ~ Box::new(async_dummy2())
|
error[E0308]: `if` and `else` have incompatible types
- --> $DIR/if-then-neeing-semi.rs:63:9
+ --> $DIR/if-then-neeing-semi.rs:54:9
|
LL | let _ = if true {
| _____________-
@@ -79,24 +75,12 @@ LL | | async_dummy()
LL | |
LL | | } else {
LL | | async_dummy2()
- | | ^^^^^^^^^^^^^^ expected opaque type, found a different opaque type
-... |
+ | | ^^^^^^^^^^^^^^ expected future, found a different future
+LL | |
LL | |
LL | | };
| |_____- `if` and `else` have incompatible types
|
-note: while checking the return type of the `async fn`
- --> $DIR/if-then-neeing-semi.rs:18: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/if-then-neeing-semi.rs:24: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/if-then-neeing-semi.rs:18:24>)
- found opaque type `impl Future<Output = ()>` (opaque type at <$DIR/if-then-neeing-semi.rs:24:25>)
= note: distinct uses of `impl Trait` result in different opaque types
help: consider `await`ing on both `Future`s
|