@@ -140,42 +140,54 @@ LL | }
140140error[E0728]: `await` is only allowed inside `async` functions and blocks
141141 --> $DIR/incorrect-syntax-suggestions.rs:68:19
142142 |
143- LL | fn foo13() -> Result<(), ()> {
144- | ----- this is not `async`
145- LL | let _ = bar().await();
146- | ^^^^^ only allowed inside `async` functions and blocks
143+ LL | / fn foo13() -> Result<(), ()> {
144+ LL | | let _ = bar().await();
145+ | | ^^^^^ only allowed inside `async` functions and blocks
146+ LL | |
147+ LL | | Ok(())
148+ LL | | }
149+ | |_- this is not `async`
147150
148151error[E0728]: `await` is only allowed inside `async` functions and blocks
149152 --> $DIR/incorrect-syntax-suggestions.rs:73:19
150153 |
151- LL | fn foo14() -> Result<(), ()> {
152- | ----- this is not `async`
153- LL | let _ = bar().await()?;
154- | ^^^^^ only allowed inside `async` functions and blocks
154+ LL | / fn foo14() -> Result<(), ()> {
155+ LL | | let _ = bar().await()?;
156+ | | ^^^^^ only allowed inside `async` functions and blocks
157+ LL | |
158+ LL | | Ok(())
159+ LL | | }
160+ | |_- this is not `async`
155161
156162error[E0728]: `await` is only allowed inside `async` functions and blocks
157163 --> $DIR/incorrect-syntax-suggestions.rs:78:19
158164 |
159- LL | fn foo15() -> Result<(), ()> {
160- | ----- this is not `async`
161- LL | let _ = bar().await;
162- | ^^^^^ only allowed inside `async` functions and blocks
165+ LL | / fn foo15() -> Result<(), ()> {
166+ LL | | let _ = bar().await;
167+ | | ^^^^^ only allowed inside `async` functions and blocks
168+ LL | | Ok(())
169+ LL | | }
170+ | |_- this is not `async`
163171
164172error[E0728]: `await` is only allowed inside `async` functions and blocks
165173 --> $DIR/incorrect-syntax-suggestions.rs:82:19
166174 |
167- LL | fn foo16() -> Result<(), ()> {
168- | ----- this is not `async`
169- LL | let _ = bar().await?;
170- | ^^^^^ only allowed inside `async` functions and blocks
175+ LL | / fn foo16() -> Result<(), ()> {
176+ LL | | let _ = bar().await?;
177+ | | ^^^^^ only allowed inside `async` functions and blocks
178+ LL | | Ok(())
179+ LL | | }
180+ | |_- this is not `async`
171181
172182error[E0728]: `await` is only allowed inside `async` functions and blocks
173183 --> $DIR/incorrect-syntax-suggestions.rs:87:23
174184 |
175- LL | fn foo() -> Result<(), ()> {
176- | --- this is not `async`
177- LL | let _ = bar().await?;
178- | ^^^^^ only allowed inside `async` functions and blocks
185+ LL | / fn foo() -> Result<(), ()> {
186+ LL | | let _ = bar().await?;
187+ | | ^^^^^ only allowed inside `async` functions and blocks
188+ LL | | Ok(())
189+ LL | | }
190+ | |_____- this is not `async`
179191
180192error[E0728]: `await` is only allowed inside `async` functions and blocks
181193 --> $DIR/incorrect-syntax-suggestions.rs:94:23
0 commit comments