1
1
error[E0308]: mismatched types
2
- --> $DIR/suggest-missing-await.rs:12 :14
2
+ --> $DIR/suggest-missing-await.rs:13 :14
3
3
|
4
4
LL | take_u32(x)
5
5
| -------- ^ expected `u32`, found future
6
6
| |
7
7
| arguments to this function are incorrect
8
8
|
9
9
note: calling an async function returns a future
10
- --> $DIR/suggest-missing-await.rs:12 :14
10
+ --> $DIR/suggest-missing-await.rs:13 :14
11
11
|
12
12
LL | take_u32(x)
13
13
| ^
14
14
note: function defined here
15
- --> $DIR/suggest-missing-await.rs:3 :4
15
+ --> $DIR/suggest-missing-await.rs:4 :4
16
16
|
17
17
LL | fn take_u32(_x: u32) {}
18
18
| ^^^^^^^^ -------
@@ -22,13 +22,13 @@ LL | take_u32(x.await)
22
22
| ++++++
23
23
24
24
error[E0308]: mismatched types
25
- --> $DIR/suggest-missing-await.rs:22 :5
25
+ --> $DIR/suggest-missing-await.rs:23 :5
26
26
|
27
27
LL | dummy()
28
28
| ^^^^^^^ expected `()`, found future
29
29
|
30
30
note: calling an async function returns a future
31
- --> $DIR/suggest-missing-await.rs:22 :5
31
+ --> $DIR/suggest-missing-await.rs:23 :5
32
32
|
33
33
LL | dummy()
34
34
| ^^^^^^^
@@ -42,7 +42,7 @@ LL | dummy();
42
42
| +
43
43
44
44
error[E0308]: `if` and `else` have incompatible types
45
- --> $DIR/suggest-missing-await.rs:35 :9
45
+ --> $DIR/suggest-missing-await.rs:36 :9
46
46
|
47
47
LL | let _x = if true {
48
48
| ______________-
@@ -64,7 +64,7 @@ LL | dummy().await
64
64
| ++++++
65
65
66
66
error[E0308]: `match` arms have incompatible types
67
- --> $DIR/suggest-missing-await.rs:45 :14
67
+ --> $DIR/suggest-missing-await.rs:46 :14
68
68
|
69
69
LL | let _x = match 0usize {
70
70
| ______________-
@@ -87,7 +87,7 @@ LL ~ 1 => dummy().await,
87
87
|
88
88
89
89
error[E0308]: mismatched types
90
- --> $DIR/suggest-missing-await.rs:53 :9
90
+ --> $DIR/suggest-missing-await.rs:54 :9
91
91
|
92
92
LL | let _x = match dummy() {
93
93
| ------- this expression has type `impl Future<Output = ()>`
@@ -102,7 +102,7 @@ LL | let _x = match dummy().await {
102
102
| ++++++
103
103
104
104
error[E0308]: mismatched types
105
- --> $DIR/suggest-missing-await.rs:67 :9
105
+ --> $DIR/suggest-missing-await.rs:68 :9
106
106
|
107
107
LL | match dummy_result() {
108
108
| -------------- this expression has type `impl Future<Output = Result<(), ()>>`
@@ -118,7 +118,7 @@ LL | match dummy_result().await {
118
118
| ++++++
119
119
120
120
error[E0308]: mismatched types
121
- --> $DIR/suggest-missing-await.rs:69 :9
121
+ --> $DIR/suggest-missing-await.rs:70 :9
122
122
|
123
123
LL | match dummy_result() {
124
124
| -------------- this expression has type `impl Future<Output = Result<(), ()>>`
@@ -134,7 +134,7 @@ LL | match dummy_result().await {
134
134
| ++++++
135
135
136
136
error[E0308]: mismatched types
137
- --> $DIR/suggest-missing-await.rs:77 :27
137
+ --> $DIR/suggest-missing-await.rs:78 :27
138
138
|
139
139
LL | Some(do_async()).map(|()| {});
140
140
| ^^
0 commit comments