@@ -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:22 :13
20+ --> $DIR/incorrect-syntax-suggestions.rs:21 :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:26 :13
26+ --> $DIR/incorrect-syntax-suggestions.rs:25 :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:30 :13
32+ --> $DIR/incorrect-syntax-suggestions.rs:29 :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:34 :14
38+ --> $DIR/incorrect-syntax-suggestions.rs:33 :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:38 :24
44+ --> $DIR/incorrect-syntax-suggestions.rs:37 :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:42 :24
50+ --> $DIR/incorrect-syntax-suggestions.rs:41 :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:54 :13
56+ --> $DIR/incorrect-syntax-suggestions.rs:53 :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:59 :13
62+ --> $DIR/incorrect-syntax-suggestions.rs:58 :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:64 :13
68+ --> $DIR/incorrect-syntax-suggestions.rs:63 :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:68 :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:73 :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:78 :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:106 :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:110 :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:115 :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:123 :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:131 :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:131 :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:134 :1
131131 |
132132LL | match await { await => () }
133133 | ----- - expected one of `.`, `?`, `{`, or an operator here
@@ -138,115 +138,110 @@ LL | }
138138 | ^ unexpected token
139139
140140error[E0728]: `await` is only allowed inside `async` functions and blocks
141- --> $DIR/incorrect-syntax-suggestions.rs:54 :13
141+ --> $DIR/incorrect-syntax-suggestions.rs:53 :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:59 :13
149+ --> $DIR/incorrect-syntax-suggestions.rs:58 :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:64 :13
157+ --> $DIR/incorrect-syntax-suggestions.rs:63 :13
158158 |
159159LL | fn foo11() -> Result<(), ()> {
160160 | ----- this is not `async`
161161LL | let _ = await bar()?;
162162 | ^^^^^^^^^^^^ only allowed inside `async` functions and blocks
163163
164164error[E0728]: `await` is only allowed inside `async` functions and blocks
165- --> $DIR/incorrect-syntax-suggestions.rs:69 :14
165+ --> $DIR/incorrect-syntax-suggestions.rs:68 :14
166166 |
167167LL | fn foo12() -> Result<(), ()> {
168168 | ----- this is not `async`
169169LL | let _ = (await bar())?;
170170 | ^^^^^^^^^^^ only allowed inside `async` functions and blocks
171171
172172error[E0728]: `await` is only allowed inside `async` functions and blocks
173- --> $DIR/incorrect-syntax-suggestions.rs:74 :13
173+ --> $DIR/incorrect-syntax-suggestions.rs:73 :13
174174 |
175175LL | fn foo13() -> Result<(), ()> {
176176 | ----- this is not `async`
177177LL | let _ = bar().await();
178178 | ^^^^^^^^^^^ only allowed inside `async` functions and blocks
179179
180180error[E0728]: `await` is only allowed inside `async` functions and blocks
181- --> $DIR/incorrect-syntax-suggestions.rs:79 :13
181+ --> $DIR/incorrect-syntax-suggestions.rs:78 :13
182182 |
183183LL | fn foo14() -> Result<(), ()> {
184184 | ----- this is not `async`
185185LL | let _ = bar().await()?;
186186 | ^^^^^^^^^^^ only allowed inside `async` functions and blocks
187187
188188error[E0728]: `await` is only allowed inside `async` functions and blocks
189- --> $DIR/incorrect-syntax-suggestions.rs:84 :13
189+ --> $DIR/incorrect-syntax-suggestions.rs:83 :13
190190 |
191191LL | fn foo15() -> Result<(), ()> {
192192 | ----- this is not `async`
193193LL | let _ = bar().await;
194194 | ^^^^^^^^^^^ only allowed inside `async` functions and blocks
195195
196196error[E0728]: `await` is only allowed inside `async` functions and blocks
197- --> $DIR/incorrect-syntax-suggestions.rs:88 :13
197+ --> $DIR/incorrect-syntax-suggestions.rs:87 :13
198198 |
199199LL | fn foo16() -> Result<(), ()> {
200200 | ----- this is not `async`
201201LL | let _ = bar().await?;
202202 | ^^^^^^^^^^^ only allowed inside `async` functions and blocks
203203
204204error[E0728]: `await` is only allowed inside `async` functions and blocks
205- --> $DIR/incorrect-syntax-suggestions.rs:93 :17
205+ --> $DIR/incorrect-syntax-suggestions.rs:92 :17
206206 |
207207LL | fn foo() -> Result<(), ()> {
208208 | --- this is not `async`
209209LL | let _ = bar().await?;
210210 | ^^^^^^^^^^^ only allowed inside `async` functions and blocks
211211
212212error[E0728]: `await` is only allowed inside `async` functions and blocks
213- --> $DIR/incorrect-syntax-suggestions.rs:100 :17
213+ --> $DIR/incorrect-syntax-suggestions.rs:99 :17
214214 |
215215LL | let foo = || {
216216 | -- this is not `async`
217217LL | let _ = bar().await?;
218218 | ^^^^^^^^^^^ only allowed inside `async` functions and blocks
219219
220220error[E0728]: `await` is only allowed inside `async` functions and blocks
221- --> $DIR/incorrect-syntax-suggestions.rs:116 :17
221+ --> $DIR/incorrect-syntax-suggestions.rs:115 :17
222222 |
223223LL | fn foo() -> Result<(), ()> {
224224 | --- this is not `async`
225225LL | let _ = await!(bar())?;
226226 | ^^^^^^^^^^^^^ only allowed inside `async` functions and blocks
227227
228228error[E0728]: `await` is only allowed inside `async` functions and blocks
229- --> $DIR/incorrect-syntax-suggestions.rs:124 :17
229+ --> $DIR/incorrect-syntax-suggestions.rs:123 :17
230230 |
231231LL | let foo = || {
232232 | -- this is not `async`
233233LL | let _ = await!(bar())?;
234234 | ^^^^^^^^^^^^^ only allowed inside `async` functions and blocks
235235
236- error[E0277]: the trait bound `impl std::future::Future: std::ops::Try` is not satisfied
236+ error[E0277]: the `?` operator can only be applied to values that implement ` std::ops::Try`
237237 --> $DIR/incorrect-syntax-suggestions.rs:16:19
238238 |
239239LL | let _ = await bar()?;
240- | ^^^^^ the trait `std::ops::Try` is not implemented for `impl std::future::Future`
240+ | ^^^^^^ the `?` operator cannot be applied to type `impl std::future::Future`
241241 |
242+ = help: the trait `std::ops::Try` is not implemented for `impl std::future::Future`
242243 = note: required by `std::ops::Try::into_result`
243244
244- error[E0277]: the trait bound `impl std::future::Future: std::ops::Try` is not satisfied
245- --> $DIR/incorrect-syntax-suggestions.rs:16:19
246- |
247- LL | let _ = await bar()?;
248- | ^^^^^^ the trait `std::ops::Try` is not implemented for `impl std::future::Future`
249-
250- error: aborting due to 36 previous errors
245+ error: aborting due to 35 previous errors
251246
252247For more information about this error, try `rustc --explain E0277`.
0 commit comments