11error[E0308]: mismatched types
2- --> $DIR/suggest-missing-await.rs:12 :14
2+ --> $DIR/suggest-missing-await.rs:13 :14
33 |
44LL | take_u32(x)
55 | -------- ^ expected `u32`, found future
66 | |
77 | arguments to this function are incorrect
88 |
99note: calling an async function returns a future
10- --> $DIR/suggest-missing-await.rs:12 :14
10+ --> $DIR/suggest-missing-await.rs:13 :14
1111 |
1212LL | take_u32(x)
1313 | ^
1414note: function defined here
15- --> $DIR/suggest-missing-await.rs:3 :4
15+ --> $DIR/suggest-missing-await.rs:4 :4
1616 |
1717LL | fn take_u32(_x: u32) {}
1818 | ^^^^^^^^ -------
@@ -22,13 +22,13 @@ LL | take_u32(x.await)
2222 | ++++++
2323
2424error[E0308]: mismatched types
25- --> $DIR/suggest-missing-await.rs:22 :5
25+ --> $DIR/suggest-missing-await.rs:23 :5
2626 |
2727LL | dummy()
2828 | ^^^^^^^ expected `()`, found future
2929 |
3030note: calling an async function returns a future
31- --> $DIR/suggest-missing-await.rs:22 :5
31+ --> $DIR/suggest-missing-await.rs:23 :5
3232 |
3333LL | dummy()
3434 | ^^^^^^^
@@ -42,7 +42,7 @@ LL | dummy();
4242 | +
4343
4444error[E0308]: `if` and `else` have incompatible types
45- --> $DIR/suggest-missing-await.rs:35 :9
45+ --> $DIR/suggest-missing-await.rs:36 :9
4646 |
4747LL | let _x = if true {
4848 | ______________-
@@ -64,7 +64,7 @@ LL | dummy().await
6464 | ++++++
6565
6666error[E0308]: `match` arms have incompatible types
67- --> $DIR/suggest-missing-await.rs:45 :14
67+ --> $DIR/suggest-missing-await.rs:46 :14
6868 |
6969LL | let _x = match 0usize {
7070 | ______________-
@@ -87,7 +87,7 @@ LL ~ 1 => dummy().await,
8787 |
8888
8989error[E0308]: mismatched types
90- --> $DIR/suggest-missing-await.rs:53 :9
90+ --> $DIR/suggest-missing-await.rs:54 :9
9191 |
9292LL | let _x = match dummy() {
9393 | ------- this expression has type `impl Future<Output = ()>`
@@ -102,7 +102,7 @@ LL | let _x = match dummy().await {
102102 | ++++++
103103
104104error[E0308]: mismatched types
105- --> $DIR/suggest-missing-await.rs:67 :9
105+ --> $DIR/suggest-missing-await.rs:68 :9
106106 |
107107LL | match dummy_result() {
108108 | -------------- this expression has type `impl Future<Output = Result<(), ()>>`
@@ -118,7 +118,7 @@ LL | match dummy_result().await {
118118 | ++++++
119119
120120error[E0308]: mismatched types
121- --> $DIR/suggest-missing-await.rs:69 :9
121+ --> $DIR/suggest-missing-await.rs:70 :9
122122 |
123123LL | match dummy_result() {
124124 | -------------- this expression has type `impl Future<Output = Result<(), ()>>`
@@ -134,7 +134,7 @@ LL | match dummy_result().await {
134134 | ++++++
135135
136136error[E0308]: mismatched types
137- --> $DIR/suggest-missing-await.rs:77 :27
137+ --> $DIR/suggest-missing-await.rs:78 :27
138138 |
139139LL | Some(do_async()).map(|()| {});
140140 | ^^
0 commit comments