@@ -59,75 +59,75 @@ LL | let _ = await bar();
5959 | ^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`
6060
6161error: incorrect use of `await`
62- --> $DIR/incorrect-syntax-suggestions.rs:57 :13
62+ --> $DIR/incorrect-syntax-suggestions.rs:56 :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:62 :13
68+ --> $DIR/incorrect-syntax-suggestions.rs:60 :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:66 :14
74+ --> $DIR/incorrect-syntax-suggestions.rs:64 :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:71 :24
80+ --> $DIR/incorrect-syntax-suggestions.rs:68 :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:76 :24
86+ --> $DIR/incorrect-syntax-suggestions.rs:73 :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:104 :13
92+ --> $DIR/incorrect-syntax-suggestions.rs:101 :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:108 :13
98+ --> $DIR/incorrect-syntax-suggestions.rs:105 :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:113 :17
104+ --> $DIR/incorrect-syntax-suggestions.rs:110 :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:121 :17
110+ --> $DIR/incorrect-syntax-suggestions.rs:117 :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:129 :25
116+ --> $DIR/incorrect-syntax-suggestions.rs:124 :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:129 :11
124+ --> $DIR/incorrect-syntax-suggestions.rs:124 :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:132 :1
130+ --> $DIR/incorrect-syntax-suggestions.rs:127 :1
131131 |
132132LL | match await { await => () }
133133 | ----- - expected one of `.`, `?`, `{`, or an operator
@@ -138,93 +138,53 @@ LL | }
138138 | ^ unexpected token
139139
140140error[E0728]: `await` is only allowed inside `async` functions and blocks
141- --> $DIR/incorrect-syntax-suggestions.rs:52:13
142- |
143- LL | fn foo9() -> Result<(), ()> {
144- | ---- this is not `async`
145- LL | let _ = await bar();
146- | ^^^^^ only allowed inside `async` functions and blocks
147-
148- error[E0728]: `await` is only allowed inside `async` functions and blocks
149- --> $DIR/incorrect-syntax-suggestions.rs:57:13
150- |
151- LL | fn foo10() -> Result<(), ()> {
152- | ----- this is not `async`
153- LL | let _ = await? bar();
154- | ^^^^^ only allowed inside `async` functions and blocks
155-
156- error[E0728]: `await` is only allowed inside `async` functions and blocks
157- --> $DIR/incorrect-syntax-suggestions.rs:66:14
158- |
159- LL | fn foo12() -> 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:71:19
141+ --> $DIR/incorrect-syntax-suggestions.rs:68:19
166142 |
167143LL | fn foo13() -> Result<(), ()> {
168144 | ----- this is not `async`
169145LL | let _ = bar().await();
170146 | ^^^^^ only allowed inside `async` functions and blocks
171147
172148error[E0728]: `await` is only allowed inside `async` functions and blocks
173- --> $DIR/incorrect-syntax-suggestions.rs:76 :19
149+ --> $DIR/incorrect-syntax-suggestions.rs:73 :19
174150 |
175151LL | fn foo14() -> Result<(), ()> {
176152 | ----- this is not `async`
177153LL | let _ = bar().await()?;
178154 | ^^^^^ only allowed inside `async` functions and blocks
179155
180156error[E0728]: `await` is only allowed inside `async` functions and blocks
181- --> $DIR/incorrect-syntax-suggestions.rs:81 :19
157+ --> $DIR/incorrect-syntax-suggestions.rs:78 :19
182158 |
183159LL | fn foo15() -> Result<(), ()> {
184160 | ----- this is not `async`
185161LL | let _ = bar().await;
186162 | ^^^^^ only allowed inside `async` functions and blocks
187163
188164error[E0728]: `await` is only allowed inside `async` functions and blocks
189- --> $DIR/incorrect-syntax-suggestions.rs:85 :19
165+ --> $DIR/incorrect-syntax-suggestions.rs:82 :19
190166 |
191167LL | fn foo16() -> Result<(), ()> {
192168 | ----- this is not `async`
193169LL | let _ = bar().await?;
194170 | ^^^^^ only allowed inside `async` functions and blocks
195171
196172error[E0728]: `await` is only allowed inside `async` functions and blocks
197- --> $DIR/incorrect-syntax-suggestions.rs:90 :23
173+ --> $DIR/incorrect-syntax-suggestions.rs:87 :23
198174 |
199175LL | fn foo() -> Result<(), ()> {
200176 | --- this is not `async`
201177LL | let _ = bar().await?;
202178 | ^^^^^ only allowed inside `async` functions and blocks
203179
204180error[E0728]: `await` is only allowed inside `async` functions and blocks
205- --> $DIR/incorrect-syntax-suggestions.rs:97 :23
181+ --> $DIR/incorrect-syntax-suggestions.rs:94 :23
206182 |
207183LL | let foo = || {
208184 | -- this is not `async`
209185LL | let _ = bar().await?;
210186 | ^^^^^ only allowed inside `async` functions and blocks
211187
212- error[E0728]: `await` is only allowed inside `async` functions and blocks
213- --> $DIR/incorrect-syntax-suggestions.rs:113:17
214- |
215- LL | fn foo() -> Result<(), ()> {
216- | --- this is not `async`
217- LL | let _ = await!(bar())?;
218- | ^^^^^ only allowed inside `async` functions and blocks
219-
220- error[E0728]: `await` is only allowed inside `async` functions and blocks
221- --> $DIR/incorrect-syntax-suggestions.rs:121:17
222- |
223- LL | let foo = || {
224- | -- this is not `async`
225- LL | let _ = await!(bar())?;
226- | ^^^^^ only allowed inside `async` functions and blocks
227-
228- error: aborting due to 33 previous errors
188+ error: aborting due to 28 previous errors
229189
230190For more information about this error, try `rustc --explain E0728`.
0 commit comments