1 error: incorrect use of `await`
2 --> $DIR/incorrect-syntax-suggestions.rs:8:13
4 LL | let _ = await bar();
5 | ^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`
7 error: incorrect use of `await`
8 --> $DIR/incorrect-syntax-suggestions.rs:12:13
10 LL | let _ = await? bar();
11 | ^^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await?`
13 error: incorrect use of `await`
14 --> $DIR/incorrect-syntax-suggestions.rs:16:13
16 LL | let _ = await bar()?;
17 | ^^^^^^^^^^^^ help: `await` is a postfix operation: `bar()?.await`
19 error: incorrect use of `await`
20 --> $DIR/incorrect-syntax-suggestions.rs:20:13
22 LL | let _ = await { bar() };
23 | ^^^^^^^^^^^^^^^ help: `await` is a postfix operation: `{ bar() }.await`
25 error: incorrect use of `await`
26 --> $DIR/incorrect-syntax-suggestions.rs:24:13
28 LL | let _ = await(bar());
29 | ^^^^^^^^^^^^ help: `await` is a postfix operation: `(bar()).await`
31 error: incorrect use of `await`
32 --> $DIR/incorrect-syntax-suggestions.rs:28:13
34 LL | let _ = await { bar() }?;
35 | ^^^^^^^^^^^^^^^ help: `await` is a postfix operation: `{ bar() }.await`
37 error: incorrect use of `await`
38 --> $DIR/incorrect-syntax-suggestions.rs:32:14
40 LL | let _ = (await bar())?;
41 | ^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`
43 error: incorrect use of `await`
44 --> $DIR/incorrect-syntax-suggestions.rs:36:24
46 LL | let _ = bar().await();
47 | ^^ help: `await` is not a method call, remove the parentheses
49 error: incorrect use of `await`
50 --> $DIR/incorrect-syntax-suggestions.rs:40:24
52 LL | let _ = bar().await()?;
53 | ^^ help: `await` is not a method call, remove the parentheses
55 error: incorrect use of `await`
56 --> $DIR/incorrect-syntax-suggestions.rs:52:13
58 LL | let _ = await bar();
59 | ^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`
61 error: incorrect use of `await`
62 --> $DIR/incorrect-syntax-suggestions.rs:57:13
64 LL | let _ = await? bar();
65 | ^^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await?`
67 error: incorrect use of `await`
68 --> $DIR/incorrect-syntax-suggestions.rs:62:13
70 LL | let _ = await bar()?;
71 | ^^^^^^^^^^^^ help: `await` is a postfix operation: `bar()?.await`
73 error: incorrect use of `await`
74 --> $DIR/incorrect-syntax-suggestions.rs:66:14
76 LL | let _ = (await bar())?;
77 | ^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`
79 error: incorrect use of `await`
80 --> $DIR/incorrect-syntax-suggestions.rs:71:24
82 LL | let _ = bar().await();
83 | ^^ help: `await` is not a method call, remove the parentheses
85 error: incorrect use of `await`
86 --> $DIR/incorrect-syntax-suggestions.rs:76:24
88 LL | let _ = bar().await()?;
89 | ^^ help: `await` is not a method call, remove the parentheses
91 error: incorrect use of `await`
92 --> $DIR/incorrect-syntax-suggestions.rs:104:13
94 LL | let _ = await!(bar());
95 | ^^^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`
97 error: incorrect use of `await`
98 --> $DIR/incorrect-syntax-suggestions.rs:108:13
100 LL | let _ = await!(bar())?;
101 | ^^^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`
103 error: incorrect use of `await`
104 --> $DIR/incorrect-syntax-suggestions.rs:113:17
106 LL | let _ = await!(bar())?;
107 | ^^^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`
109 error: incorrect use of `await`
110 --> $DIR/incorrect-syntax-suggestions.rs:121:17
112 LL | let _ = await!(bar())?;
113 | ^^^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`
115 error: expected expression, found `=>`
116 --> $DIR/incorrect-syntax-suggestions.rs:129:25
118 LL | match await { await => () }
119 | ----- ^^ expected expression
121 | while parsing this incorrect await expression
123 error: incorrect use of `await`
124 --> $DIR/incorrect-syntax-suggestions.rs:129:11
126 LL | match await { await => () }
127 | ^^^^^^^^^^^^^^^^^^^^^ help: `await` is a postfix operation: `{ await => () }.await`
129 error: expected one of `.`, `?`, `{`, or an operator, found `}`
130 --> $DIR/incorrect-syntax-suggestions.rs:132:1
132 LL | match await { await => () }
133 | ----- - expected one of `.`, `?`, `{`, or an operator
135 | while parsing this `match` expression
140 error[E0728]: `await` is only allowed inside `async` functions and blocks
141 --> $DIR/incorrect-syntax-suggestions.rs:52:13
143 LL | fn foo9() -> Result<(), ()> {
144 | ---- this is not `async`
145 LL | let _ = await bar();
146 | ^^^^^^^^^^^ only allowed inside `async` functions and blocks
148 error[E0728]: `await` is only allowed inside `async` functions and blocks
149 --> $DIR/incorrect-syntax-suggestions.rs:57:13
151 LL | fn foo10() -> Result<(), ()> {
152 | ----- this is not `async`
153 LL | let _ = await? bar();
154 | ^^^^^^^^^^^^ only allowed inside `async` functions and blocks
156 error[E0728]: `await` is only allowed inside `async` functions and blocks
157 --> $DIR/incorrect-syntax-suggestions.rs:66:14
159 LL | fn foo12() -> Result<(), ()> {
160 | ----- this is not `async`
161 LL | let _ = (await bar())?;
162 | ^^^^^^^^^^^ only allowed inside `async` functions and blocks
164 error[E0728]: `await` is only allowed inside `async` functions and blocks
165 --> $DIR/incorrect-syntax-suggestions.rs:71:18
167 LL | fn foo13() -> Result<(), ()> {
168 | ----- this is not `async`
169 LL | let _ = bar().await();
170 | ^^^^^^ only allowed inside `async` functions and blocks
172 error[E0728]: `await` is only allowed inside `async` functions and blocks
173 --> $DIR/incorrect-syntax-suggestions.rs:76:18
175 LL | fn foo14() -> Result<(), ()> {
176 | ----- this is not `async`
177 LL | let _ = bar().await()?;
178 | ^^^^^^ only allowed inside `async` functions and blocks
180 error[E0728]: `await` is only allowed inside `async` functions and blocks
181 --> $DIR/incorrect-syntax-suggestions.rs:81:18
183 LL | fn foo15() -> Result<(), ()> {
184 | ----- this is not `async`
185 LL | let _ = bar().await;
186 | ^^^^^^ only allowed inside `async` functions and blocks
188 error[E0728]: `await` is only allowed inside `async` functions and blocks
189 --> $DIR/incorrect-syntax-suggestions.rs:85:18
191 LL | fn foo16() -> Result<(), ()> {
192 | ----- this is not `async`
193 LL | let _ = bar().await?;
194 | ^^^^^^ only allowed inside `async` functions and blocks
196 error[E0728]: `await` is only allowed inside `async` functions and blocks
197 --> $DIR/incorrect-syntax-suggestions.rs:90:22
199 LL | fn foo() -> Result<(), ()> {
200 | --- this is not `async`
201 LL | let _ = bar().await?;
202 | ^^^^^^ only allowed inside `async` functions and blocks
204 error[E0728]: `await` is only allowed inside `async` functions and blocks
205 --> $DIR/incorrect-syntax-suggestions.rs:97:22
208 | -- this is not `async`
209 LL | let _ = bar().await?;
210 | ^^^^^^ only allowed inside `async` functions and blocks
212 error[E0728]: `await` is only allowed inside `async` functions and blocks
213 --> $DIR/incorrect-syntax-suggestions.rs:113:29
215 LL | fn foo() -> Result<(), ()> {
216 | --- this is not `async`
217 LL | let _ = await!(bar())?;
218 | ^ only allowed inside `async` functions and blocks
220 error[E0728]: `await` is only allowed inside `async` functions and blocks
221 --> $DIR/incorrect-syntax-suggestions.rs:121:29
224 | -- this is not `async`
225 LL | let _ = await!(bar())?;
226 | ^ only allowed inside `async` functions and blocks
228 error: aborting due to 33 previous errors
230 For more information about this error, try `rustc --explain E0728`.