@@ -17,117 +17,117 @@ LL | let _ = await bar()?;
17
17
| ^^^^^^^^^^^^ help: `await` is a postfix operation: `bar()?.await`
18
18
19
19
error: incorrect use of `await`
20
- --> $DIR/incorrect-syntax-suggestions.rs:21 :13
20
+ --> $DIR/incorrect-syntax-suggestions.rs:20 :13
21
21
|
22
22
LL | let _ = await { bar() };
23
23
| ^^^^^^^^^^^^^^^ help: `await` is a postfix operation: `{ bar() }.await`
24
24
25
25
error: incorrect use of `await`
26
- --> $DIR/incorrect-syntax-suggestions.rs:25 :13
26
+ --> $DIR/incorrect-syntax-suggestions.rs:24 :13
27
27
|
28
28
LL | let _ = await(bar());
29
29
| ^^^^^^^^^^^^ help: `await` is a postfix operation: `(bar()).await`
30
30
31
31
error: incorrect use of `await`
32
- --> $DIR/incorrect-syntax-suggestions.rs:29 :13
32
+ --> $DIR/incorrect-syntax-suggestions.rs:28 :13
33
33
|
34
34
LL | let _ = await { bar() }?;
35
35
| ^^^^^^^^^^^^^^^ help: `await` is a postfix operation: `{ bar() }.await`
36
36
37
37
error: incorrect use of `await`
38
- --> $DIR/incorrect-syntax-suggestions.rs:33 :14
38
+ --> $DIR/incorrect-syntax-suggestions.rs:32 :14
39
39
|
40
40
LL | let _ = (await bar())?;
41
41
| ^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`
42
42
43
43
error: incorrect use of `await`
44
- --> $DIR/incorrect-syntax-suggestions.rs:37 :24
44
+ --> $DIR/incorrect-syntax-suggestions.rs:36 :24
45
45
|
46
46
LL | let _ = bar().await();
47
47
| ^^ help: `await` is not a method call, remove the parentheses
48
48
49
49
error: incorrect use of `await`
50
- --> $DIR/incorrect-syntax-suggestions.rs:41 :24
50
+ --> $DIR/incorrect-syntax-suggestions.rs:40 :24
51
51
|
52
52
LL | let _ = bar().await()?;
53
53
| ^^ help: `await` is not a method call, remove the parentheses
54
54
55
55
error: incorrect use of `await`
56
- --> $DIR/incorrect-syntax-suggestions.rs:53 :13
56
+ --> $DIR/incorrect-syntax-suggestions.rs:52 :13
57
57
|
58
58
LL | let _ = await bar();
59
59
| ^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`
60
60
61
61
error: incorrect use of `await`
62
- --> $DIR/incorrect-syntax-suggestions.rs:58 :13
62
+ --> $DIR/incorrect-syntax-suggestions.rs:57 :13
63
63
|
64
64
LL | let _ = await? bar();
65
65
| ^^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await?`
66
66
67
67
error: incorrect use of `await`
68
- --> $DIR/incorrect-syntax-suggestions.rs:63 :13
68
+ --> $DIR/incorrect-syntax-suggestions.rs:62 :13
69
69
|
70
70
LL | let _ = await bar()?;
71
71
| ^^^^^^^^^^^^ help: `await` is a postfix operation: `bar()?.await`
72
72
73
73
error: incorrect use of `await`
74
- --> $DIR/incorrect-syntax-suggestions.rs:69 :14
74
+ --> $DIR/incorrect-syntax-suggestions.rs:66 :14
75
75
|
76
76
LL | let _ = (await bar())?;
77
77
| ^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`
78
78
79
79
error: incorrect use of `await`
80
- --> $DIR/incorrect-syntax-suggestions.rs:74 :24
80
+ --> $DIR/incorrect-syntax-suggestions.rs:71 :24
81
81
|
82
82
LL | let _ = bar().await();
83
83
| ^^ help: `await` is not a method call, remove the parentheses
84
84
85
85
error: incorrect use of `await`
86
- --> $DIR/incorrect-syntax-suggestions.rs:79 :24
86
+ --> $DIR/incorrect-syntax-suggestions.rs:76 :24
87
87
|
88
88
LL | let _ = bar().await()?;
89
89
| ^^ help: `await` is not a method call, remove the parentheses
90
90
91
91
error: incorrect use of `await`
92
- --> $DIR/incorrect-syntax-suggestions.rs:107 :13
92
+ --> $DIR/incorrect-syntax-suggestions.rs:104 :13
93
93
|
94
94
LL | let _ = await!(bar());
95
95
| ^^^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`
96
96
97
97
error: incorrect use of `await`
98
- --> $DIR/incorrect-syntax-suggestions.rs:111 :13
98
+ --> $DIR/incorrect-syntax-suggestions.rs:108 :13
99
99
|
100
100
LL | let _ = await!(bar())?;
101
101
| ^^^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`
102
102
103
103
error: incorrect use of `await`
104
- --> $DIR/incorrect-syntax-suggestions.rs:116 :17
104
+ --> $DIR/incorrect-syntax-suggestions.rs:113 :17
105
105
|
106
106
LL | let _ = await!(bar())?;
107
107
| ^^^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`
108
108
109
109
error: incorrect use of `await`
110
- --> $DIR/incorrect-syntax-suggestions.rs:124 :17
110
+ --> $DIR/incorrect-syntax-suggestions.rs:121 :17
111
111
|
112
112
LL | let _ = await!(bar())?;
113
113
| ^^^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`
114
114
115
115
error: expected expression, found `=>`
116
- --> $DIR/incorrect-syntax-suggestions.rs:132 :25
116
+ --> $DIR/incorrect-syntax-suggestions.rs:129 :25
117
117
|
118
118
LL | match await { await => () }
119
119
| ----- ^^ expected expression
120
120
| |
121
121
| while parsing this incorrect await expression
122
122
123
123
error: incorrect use of `await`
124
- --> $DIR/incorrect-syntax-suggestions.rs:132 :11
124
+ --> $DIR/incorrect-syntax-suggestions.rs:129 :11
125
125
|
126
126
LL | match await { await => () }
127
127
| ^^^^^^^^^^^^^^^^^^^^^ help: `await` is a postfix operation: `{ await => () }.await`
128
128
129
129
error: expected one of `.`, `?`, `{`, or an operator, found `}`
130
- --> $DIR/incorrect-syntax-suggestions.rs:135 :1
130
+ --> $DIR/incorrect-syntax-suggestions.rs:132 :1
131
131
|
132
132
LL | match await { await => () }
133
133
| ----- - expected one of `.`, `?`, `{`, or an operator
@@ -138,124 +138,93 @@ LL | }
138
138
| ^ unexpected token
139
139
140
140
error[E0728]: `await` is only allowed inside `async` functions and blocks
141
- --> $DIR/incorrect-syntax-suggestions.rs:53 :13
141
+ --> $DIR/incorrect-syntax-suggestions.rs:52 :13
142
142
|
143
143
LL | fn foo9() -> Result<(), ()> {
144
144
| ---- this is not `async`
145
145
LL | let _ = await bar();
146
146
| ^^^^^^^^^^^ only allowed inside `async` functions and blocks
147
147
148
148
error[E0728]: `await` is only allowed inside `async` functions and blocks
149
- --> $DIR/incorrect-syntax-suggestions.rs:58 :13
149
+ --> $DIR/incorrect-syntax-suggestions.rs:57 :13
150
150
|
151
151
LL | fn foo10() -> Result<(), ()> {
152
152
| ----- this is not `async`
153
153
LL | let _ = await? bar();
154
154
| ^^^^^^^^^^^^ only allowed inside `async` functions and blocks
155
155
156
156
error[E0728]: `await` is only allowed inside `async` functions and blocks
157
- --> $DIR/incorrect-syntax-suggestions.rs:63:13
158
- |
159
- LL | fn foo11() -> Result<(), ()> {
160
- | ----- this is not `async`
161
- LL | let _ = await bar()?;
162
- | ^^^^^^^^^^^^ only allowed inside `async` functions and blocks
163
-
164
- error[E0728]: `await` is only allowed inside `async` functions and blocks
165
- --> $DIR/incorrect-syntax-suggestions.rs:69:14
157
+ --> $DIR/incorrect-syntax-suggestions.rs:66:14
166
158
|
167
159
LL | fn foo12() -> Result<(), ()> {
168
160
| ----- this is not `async`
169
161
LL | let _ = (await bar())?;
170
162
| ^^^^^^^^^^^ only allowed inside `async` functions and blocks
171
163
172
164
error[E0728]: `await` is only allowed inside `async` functions and blocks
173
- --> $DIR/incorrect-syntax-suggestions.rs:74 :13
165
+ --> $DIR/incorrect-syntax-suggestions.rs:71 :13
174
166
|
175
167
LL | fn foo13() -> Result<(), ()> {
176
168
| ----- this is not `async`
177
169
LL | let _ = bar().await();
178
170
| ^^^^^^^^^^^ only allowed inside `async` functions and blocks
179
171
180
172
error[E0728]: `await` is only allowed inside `async` functions and blocks
181
- --> $DIR/incorrect-syntax-suggestions.rs:79 :13
173
+ --> $DIR/incorrect-syntax-suggestions.rs:76 :13
182
174
|
183
175
LL | fn foo14() -> Result<(), ()> {
184
176
| ----- this is not `async`
185
177
LL | let _ = bar().await()?;
186
178
| ^^^^^^^^^^^ only allowed inside `async` functions and blocks
187
179
188
180
error[E0728]: `await` is only allowed inside `async` functions and blocks
189
- --> $DIR/incorrect-syntax-suggestions.rs:84 :13
181
+ --> $DIR/incorrect-syntax-suggestions.rs:81 :13
190
182
|
191
183
LL | fn foo15() -> Result<(), ()> {
192
184
| ----- this is not `async`
193
185
LL | let _ = bar().await;
194
186
| ^^^^^^^^^^^ only allowed inside `async` functions and blocks
195
187
196
188
error[E0728]: `await` is only allowed inside `async` functions and blocks
197
- --> $DIR/incorrect-syntax-suggestions.rs:88 :13
189
+ --> $DIR/incorrect-syntax-suggestions.rs:85 :13
198
190
|
199
191
LL | fn foo16() -> Result<(), ()> {
200
192
| ----- this is not `async`
201
193
LL | let _ = bar().await?;
202
194
| ^^^^^^^^^^^ only allowed inside `async` functions and blocks
203
195
204
196
error[E0728]: `await` is only allowed inside `async` functions and blocks
205
- --> $DIR/incorrect-syntax-suggestions.rs:93 :17
197
+ --> $DIR/incorrect-syntax-suggestions.rs:90 :17
206
198
|
207
199
LL | fn foo() -> Result<(), ()> {
208
200
| --- this is not `async`
209
201
LL | let _ = bar().await?;
210
202
| ^^^^^^^^^^^ only allowed inside `async` functions and blocks
211
203
212
204
error[E0728]: `await` is only allowed inside `async` functions and blocks
213
- --> $DIR/incorrect-syntax-suggestions.rs:100 :17
205
+ --> $DIR/incorrect-syntax-suggestions.rs:97 :17
214
206
|
215
207
LL | let foo = || {
216
208
| -- this is not `async`
217
209
LL | let _ = bar().await?;
218
210
| ^^^^^^^^^^^ only allowed inside `async` functions and blocks
219
211
220
212
error[E0728]: `await` is only allowed inside `async` functions and blocks
221
- --> $DIR/incorrect-syntax-suggestions.rs:116 :17
213
+ --> $DIR/incorrect-syntax-suggestions.rs:113 :17
222
214
|
223
215
LL | fn foo() -> Result<(), ()> {
224
216
| --- this is not `async`
225
217
LL | let _ = await!(bar())?;
226
218
| ^^^^^^^^^^^^^ only allowed inside `async` functions and blocks
227
219
228
220
error[E0728]: `await` is only allowed inside `async` functions and blocks
229
- --> $DIR/incorrect-syntax-suggestions.rs:124 :17
221
+ --> $DIR/incorrect-syntax-suggestions.rs:121 :17
230
222
|
231
223
LL | let foo = || {
232
224
| -- this is not `async`
233
225
LL | let _ = await!(bar())?;
234
226
| ^^^^^^^^^^^^^ only allowed inside `async` functions and blocks
235
227
236
- error[E0277]: the `?` operator can only be applied to values that implement `Try`
237
- --> $DIR/incorrect-syntax-suggestions.rs:16:19
238
- |
239
- LL | let _ = await bar()?;
240
- | ^^^^^^ the `?` operator cannot be applied to type `impl Future`
241
- |
242
- = help: the trait `Try` is not implemented for `impl Future`
243
- = note: required by `into_result`
244
- help: consider `await`ing on the `Future`
245
- |
246
- LL | let _ = await bar().await?;
247
- | ^^^^^^
248
-
249
- error[E0277]: the `?` operator can only be applied to values that implement `Try`
250
- --> $DIR/incorrect-syntax-suggestions.rs:63:19
251
- |
252
- LL | let _ = await bar()?;
253
- | ^^^^^^ the `?` operator cannot be applied to type `impl Future`
254
- |
255
- = help: the trait `Try` is not implemented for `impl Future`
256
- = note: required by `into_result`
257
-
258
- error: aborting due to 36 previous errors
228
+ error: aborting due to 33 previous errors
259
229
260
- Some errors have detailed explanations: E0277, E0728.
261
- For more information about an error, try `rustc --explain E0277`.
230
+ For more information about this error, try `rustc --explain E0728`.
0 commit comments