summaryrefslogtreecommitdiffstats
path: root/tests/ui/async-await/suggest-missing-await.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/async-await/suggest-missing-await.stderr')
-rw-r--r--tests/ui/async-await/suggest-missing-await.stderr59
1 files changed, 15 insertions, 44 deletions
diff --git a/tests/ui/async-await/suggest-missing-await.stderr b/tests/ui/async-await/suggest-missing-await.stderr
index 1196601ac..f0ec34a6a 100644
--- a/tests/ui/async-await/suggest-missing-await.stderr
+++ b/tests/ui/async-await/suggest-missing-await.stderr
@@ -2,17 +2,15 @@ error[E0308]: mismatched types
--> $DIR/suggest-missing-await.rs:12:14
|
LL | take_u32(x)
- | -------- ^ expected `u32`, found opaque type
+ | -------- ^ expected `u32`, found future
| |
| arguments to this function are incorrect
|
-note: while checking the return type of the `async fn`
- --> $DIR/suggest-missing-await.rs:5:24
+note: calling an async function returns a future
+ --> $DIR/suggest-missing-await.rs:12:14
|
-LL | async fn make_u32() -> u32 {
- | ^^^ checked the `Output` of this `async fn`, found opaque type
- = note: expected type `u32`
- found opaque type `impl Future<Output = u32>`
+LL | take_u32(x)
+ | ^
note: function defined here
--> $DIR/suggest-missing-await.rs:3:4
|
@@ -27,15 +25,13 @@ error[E0308]: mismatched types
--> $DIR/suggest-missing-await.rs:22:5
|
LL | dummy()
- | ^^^^^^^ expected `()`, found opaque type
+ | ^^^^^^^ expected `()`, found future
|
-note: while checking the return type of the `async fn`
- --> $DIR/suggest-missing-await.rs:18:18
+note: calling an async function returns a future
+ --> $DIR/suggest-missing-await.rs:22:5
|
-LL | async fn dummy() {}
- | ^ checked the `Output` of this `async fn`, found opaque type
- = note: expected unit type `()`
- found opaque type `impl Future<Output = ()>`
+LL | dummy()
+ | ^^^^^^^
help: consider `await`ing on the `Future`
|
LL | dummy().await
@@ -55,16 +51,11 @@ LL | | dummy()
LL | |
LL | | } else {
LL | | dummy().await
- | | ^^^^^^^^^^^^^ expected opaque type, found `()`
+ | | ^^^^^^^^^^^^^ expected future, found `()`
LL | |
LL | | };
| |_____- `if` and `else` have incompatible types
|
-note: while checking the return type of the `async fn`
- --> $DIR/suggest-missing-await.rs:18:18
- |
-LL | async fn dummy() {}
- | ^ checked the `Output` of this `async fn`, expected opaque type
= note: expected opaque type `impl Future<Output = ()>`
found unit type `()`
help: consider `await`ing on the `Future`
@@ -82,16 +73,11 @@ LL | | 0 => dummy(),
LL | | 1 => dummy(),
| | ------- this is found to be of type `impl Future<Output = ()>`
LL | | 2 => dummy().await,
- | | ^^^^^^^^^^^^^ expected opaque type, found `()`
+ | | ^^^^^^^^^^^^^ expected future, found `()`
LL | |
LL | | };
| |_____- `match` arms have incompatible types
|
-note: while checking the return type of the `async fn`
- --> $DIR/suggest-missing-await.rs:18:18
- |
-LL | async fn dummy() {}
- | ^ checked the `Output` of this `async fn`, expected opaque type
= note: expected opaque type `impl Future<Output = ()>`
found unit type `()`
help: consider `await`ing on the `Future`
@@ -106,13 +92,8 @@ error[E0308]: mismatched types
LL | let _x = match dummy() {
| ------- this expression has type `impl Future<Output = ()>`
LL | () => {}
- | ^^ expected opaque type, found `()`
- |
-note: while checking the return type of the `async fn`
- --> $DIR/suggest-missing-await.rs:18:18
+ | ^^ expected future, found `()`
|
-LL | async fn dummy() {}
- | ^ checked the `Output` of this `async fn`, expected opaque type
= note: expected opaque type `impl Future<Output = ()>`
found unit type `()`
help: consider `await`ing on the `Future`
@@ -127,13 +108,8 @@ LL | match dummy_result() {
| -------------- this expression has type `impl Future<Output = Result<(), ()>>`
...
LL | Ok(_) => {}
- | ^^^^^ expected opaque type, found enum `Result`
+ | ^^^^^ expected future, found `Result<_, _>`
|
-note: while checking the return type of the `async fn`
- --> $DIR/suggest-missing-await.rs:57:28
- |
-LL | async fn dummy_result() -> Result<(), ()> {
- | ^^^^^^^^^^^^^^ checked the `Output` of this `async fn`, expected opaque type
= note: expected opaque type `impl Future<Output = Result<(), ()>>`
found enum `Result<_, _>`
help: consider `await`ing on the `Future`
@@ -148,13 +124,8 @@ LL | match dummy_result() {
| -------------- this expression has type `impl Future<Output = Result<(), ()>>`
...
LL | Err(_) => {}
- | ^^^^^^ expected opaque type, found enum `Result`
- |
-note: while checking the return type of the `async fn`
- --> $DIR/suggest-missing-await.rs:57:28
+ | ^^^^^^ expected future, found `Result<_, _>`
|
-LL | async fn dummy_result() -> Result<(), ()> {
- | ^^^^^^^^^^^^^^ checked the `Output` of this `async fn`, expected opaque type
= note: expected opaque type `impl Future<Output = Result<(), ()>>`
found enum `Result<_, _>`
help: consider `await`ing on the `Future`