@@ -17,117 +17,117 @@ LL | let _ = await bar()?;
1717 | ^^^^^^^^^^^^ help: `await` is a postfix operation: `bar()?.await`
1818
1919error: incorrect use of `await`
20- --> $DIR/incorrect-syntax-suggestions.rs:21 :13
20+ --> $DIR/incorrect-syntax-suggestions.rs:20 :13
2121 |
2222LL | let _ = await { bar() };
2323 | ^^^^^^^^^^^^^^^ help: `await` is a postfix operation: `{ bar() }.await`
2424
2525error: incorrect use of `await`
26- --> $DIR/incorrect-syntax-suggestions.rs:25 :13
26+ --> $DIR/incorrect-syntax-suggestions.rs:24 :13
2727 |
2828LL | let _ = await(bar());
2929 | ^^^^^^^^^^^^ help: `await` is a postfix operation: `(bar()).await`
3030
3131error: incorrect use of `await`
32- --> $DIR/incorrect-syntax-suggestions.rs:29 :13
32+ --> $DIR/incorrect-syntax-suggestions.rs:28 :13
3333 |
3434LL | let _ = await { bar() }?;
3535 | ^^^^^^^^^^^^^^^ help: `await` is a postfix operation: `{ bar() }.await`
3636
3737error: incorrect use of `await`
38- --> $DIR/incorrect-syntax-suggestions.rs:33 :14
38+ --> $DIR/incorrect-syntax-suggestions.rs:32 :14
3939 |
4040LL | let _ = (await bar())?;
4141 | ^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`
4242
4343error: incorrect use of `await`
44- --> $DIR/incorrect-syntax-suggestions.rs:37 :24
44+ --> $DIR/incorrect-syntax-suggestions.rs:36 :24
4545 |
4646LL | let _ = bar().await();
4747 | ^^ help: `await` is not a method call, remove the parentheses
4848
4949error: incorrect use of `await`
50- --> $DIR/incorrect-syntax-suggestions.rs:41 :24
50+ --> $DIR/incorrect-syntax-suggestions.rs:40 :24
5151 |
5252LL | let _ = bar().await()?;
5353 | ^^ help: `await` is not a method call, remove the parentheses
5454
5555error: incorrect use of `await`
56- --> $DIR/incorrect-syntax-suggestions.rs:53 :13
56+ --> $DIR/incorrect-syntax-suggestions.rs:52 :13
5757 |
5858LL | let _ = await bar();
5959 | ^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`
6060
6161error: incorrect use of `await`
62- --> $DIR/incorrect-syntax-suggestions.rs:58 :13
62+ --> $DIR/incorrect-syntax-suggestions.rs:57 :13
6363 |
6464LL | let _ = await? bar();
6565 | ^^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await?`
6666
6767error: incorrect use of `await`
68- --> $DIR/incorrect-syntax-suggestions.rs:63 :13
68+ --> $DIR/incorrect-syntax-suggestions.rs:62 :13
6969 |
7070LL | let _ = await bar()?;
7171 | ^^^^^^^^^^^^ help: `await` is a postfix operation: `bar()?.await`
7272
7373error: incorrect use of `await`
74- --> $DIR/incorrect-syntax-suggestions.rs:69 :14
74+ --> $DIR/incorrect-syntax-suggestions.rs:66 :14
7575 |
7676LL | let _ = (await bar())?;
7777 | ^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`
7878
7979error: incorrect use of `await`
80- --> $DIR/incorrect-syntax-suggestions.rs:74 :24
80+ --> $DIR/incorrect-syntax-suggestions.rs:71 :24
8181 |
8282LL | let _ = bar().await();
8383 | ^^ help: `await` is not a method call, remove the parentheses
8484
8585error: incorrect use of `await`
86- --> $DIR/incorrect-syntax-suggestions.rs:79 :24
86+ --> $DIR/incorrect-syntax-suggestions.rs:76 :24
8787 |
8888LL | let _ = bar().await()?;
8989 | ^^ help: `await` is not a method call, remove the parentheses
9090
9191error: incorrect use of `await`
92- --> $DIR/incorrect-syntax-suggestions.rs:107 :13
92+ --> $DIR/incorrect-syntax-suggestions.rs:104 :13
9393 |
9494LL | let _ = await!(bar());
9595 | ^^^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`
9696
9797error: incorrect use of `await`
98- --> $DIR/incorrect-syntax-suggestions.rs:111 :13
98+ --> $DIR/incorrect-syntax-suggestions.rs:108 :13
9999 |
100100LL | let _ = await!(bar())?;
101101 | ^^^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`
102102
103103error: incorrect use of `await`
104- --> $DIR/incorrect-syntax-suggestions.rs:116 :17
104+ --> $DIR/incorrect-syntax-suggestions.rs:113 :17
105105 |
106106LL | let _ = await!(bar())?;
107107 | ^^^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`
108108
109109error: incorrect use of `await`
110- --> $DIR/incorrect-syntax-suggestions.rs:124 :17
110+ --> $DIR/incorrect-syntax-suggestions.rs:121 :17
111111 |
112112LL | let _ = await!(bar())?;
113113 | ^^^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`
114114
115115error: expected expression, found `=>`
116- --> $DIR/incorrect-syntax-suggestions.rs:132 :25
116+ --> $DIR/incorrect-syntax-suggestions.rs:129 :25
117117 |
118118LL | match await { await => () }
119119 | ----- ^^ expected expression
120120 | |
121121 | while parsing this incorrect await expression
122122
123123error: incorrect use of `await`
124- --> $DIR/incorrect-syntax-suggestions.rs:132 :11
124+ --> $DIR/incorrect-syntax-suggestions.rs:129 :11
125125 |
126126LL | match await { await => () }
127127 | ^^^^^^^^^^^^^^^^^^^^^ help: `await` is a postfix operation: `{ await => () }.await`
128128
129129error: expected one of `.`, `?`, `{`, or an operator, found `}`
130- --> $DIR/incorrect-syntax-suggestions.rs:135 :1
130+ --> $DIR/incorrect-syntax-suggestions.rs:132 :1
131131 |
132132LL | match await { await => () }
133133 | ----- - expected one of `.`, `?`, `{`, or an operator
@@ -138,124 +138,93 @@ LL | }
138138 | ^ unexpected token
139139
140140error[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
142142 |
143143LL | fn foo9() -> Result<(), ()> {
144144 | ---- this is not `async`
145145LL | let _ = await bar();
146146 | ^^^^^^^^^^^ only allowed inside `async` functions and blocks
147147
148148error[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
150150 |
151151LL | fn foo10() -> Result<(), ()> {
152152 | ----- this is not `async`
153153LL | let _ = await? bar();
154154 | ^^^^^^^^^^^^ only allowed inside `async` functions and blocks
155155
156156error[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
166158 |
167159LL | fn foo12() -> Result<(), ()> {
168160 | ----- this is not `async`
169161LL | let _ = (await bar())?;
170162 | ^^^^^^^^^^^ only allowed inside `async` functions and blocks
171163
172164error[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
174166 |
175167LL | fn foo13() -> Result<(), ()> {
176168 | ----- this is not `async`
177169LL | let _ = bar().await();
178170 | ^^^^^^^^^^^ only allowed inside `async` functions and blocks
179171
180172error[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
182174 |
183175LL | fn foo14() -> Result<(), ()> {
184176 | ----- this is not `async`
185177LL | let _ = bar().await()?;
186178 | ^^^^^^^^^^^ only allowed inside `async` functions and blocks
187179
188180error[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
190182 |
191183LL | fn foo15() -> Result<(), ()> {
192184 | ----- this is not `async`
193185LL | let _ = bar().await;
194186 | ^^^^^^^^^^^ only allowed inside `async` functions and blocks
195187
196188error[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
198190 |
199191LL | fn foo16() -> Result<(), ()> {
200192 | ----- this is not `async`
201193LL | let _ = bar().await?;
202194 | ^^^^^^^^^^^ only allowed inside `async` functions and blocks
203195
204196error[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
206198 |
207199LL | fn foo() -> Result<(), ()> {
208200 | --- this is not `async`
209201LL | let _ = bar().await?;
210202 | ^^^^^^^^^^^ only allowed inside `async` functions and blocks
211203
212204error[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
214206 |
215207LL | let foo = || {
216208 | -- this is not `async`
217209LL | let _ = bar().await?;
218210 | ^^^^^^^^^^^ only allowed inside `async` functions and blocks
219211
220212error[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
222214 |
223215LL | fn foo() -> Result<(), ()> {
224216 | --- this is not `async`
225217LL | let _ = await!(bar())?;
226218 | ^^^^^^^^^^^^^ only allowed inside `async` functions and blocks
227219
228220error[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
230222 |
231223LL | let foo = || {
232224 | -- this is not `async`
233225LL | let _ = await!(bar())?;
234226 | ^^^^^^^^^^^^^ only allowed inside `async` functions and blocks
235227
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
259229
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