@@ -88,6 +88,31 @@ error: incorrect use of `await`
8888LL | let _ = bar().await()?;
8989 | ^^ help: `await` is not a method call, remove the parentheses
9090
91+ error: expected expression, found `=>`
92+ --> $DIR/incorrect-syntax-suggestions.rs:108:25
93+ |
94+ LL | match await { await => () }
95+ | ----- ^^ expected expression
96+ | |
97+ | while parsing this incorrect await statement
98+
99+ error: incorrect use of `await`
100+ --> $DIR/incorrect-syntax-suggestions.rs:108:11
101+ |
102+ LL | match await { await => () }
103+ | ^^^^^^^^^^^^^^^^^^^^^ help: `await` is not a statement: `{ await => () }.await`
104+
105+ error: expected one of `.`, `?`, `{`, or an operator, found `}`
106+ --> $DIR/incorrect-syntax-suggestions.rs:111:1
107+ |
108+ LL | match await { await => () }
109+ | ----- - expected one of `.`, `?`, `{`, or an operator here
110+ | |
111+ | while parsing this match expression
112+ ...
113+ LL | }
114+ | ^ unexpected token
115+
91116error[E0728]: `await` is only allowed inside `async` functions and blocks
92117 --> $DIR/incorrect-syntax-suggestions.rs:55:13
93118 |
@@ -177,6 +202,6 @@ LL | let _ = await bar()?;
177202 = help: the trait `std::ops::Try` is not implemented for `impl std::future::Future`
178203 = note: required by `std::ops::Try::into_result`
179204
180- error: aborting due to 26 previous errors
205+ error: aborting due to 29 previous errors
181206
182207For more information about this error, try `rustc --explain E0277`.
0 commit comments