@@ -88,6 +88,31 @@ error: incorrect use of `await`
88
88
LL | let _ = bar().await()?;
89
89
| ^^ help: `await` is not a method call, remove the parentheses
90
90
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
+
91
116
error[E0728]: `await` is only allowed inside `async` functions and blocks
92
117
--> $DIR/incorrect-syntax-suggestions.rs:55:13
93
118
|
@@ -177,6 +202,6 @@ LL | let _ = await bar()?;
177
202
= help: the trait `std::ops::Try` is not implemented for `impl std::future::Future`
178
203
= note: required by `std::ops::Try::into_result`
179
204
180
- error: aborting due to 26 previous errors
205
+ error: aborting due to 29 previous errors
181
206
182
207
For more information about this error, try `rustc --explain E0277`.
0 commit comments