]> git.proxmox.com Git - rustc.git/blame - src/test/ui/async-await/await-keyword/incorrect-syntax-suggestions.stderr
New upstream version 1.44.1+dfsg1
[rustc.git] / src / test / ui / async-await / await-keyword / incorrect-syntax-suggestions.stderr
CommitLineData
48663c56 1error: incorrect use of `await`
e1599b0c 2 --> $DIR/incorrect-syntax-suggestions.rs:8:13
48663c56
XL
3 |
4LL | let _ = await bar();
5 | ^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`
6
7error: incorrect use of `await`
e1599b0c 8 --> $DIR/incorrect-syntax-suggestions.rs:12:13
48663c56
XL
9 |
10LL | let _ = await? bar();
11 | ^^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await?`
12
13error: incorrect use of `await`
e1599b0c 14 --> $DIR/incorrect-syntax-suggestions.rs:16:13
48663c56
XL
15 |
16LL | let _ = await bar()?;
17 | ^^^^^^^^^^^^ help: `await` is a postfix operation: `bar()?.await`
18
19error: incorrect use of `await`
e1599b0c 20 --> $DIR/incorrect-syntax-suggestions.rs:21:13
48663c56
XL
21 |
22LL | let _ = await { bar() };
23 | ^^^^^^^^^^^^^^^ help: `await` is a postfix operation: `{ bar() }.await`
24
25error: incorrect use of `await`
e1599b0c 26 --> $DIR/incorrect-syntax-suggestions.rs:25:13
48663c56
XL
27 |
28LL | let _ = await(bar());
29 | ^^^^^^^^^^^^ help: `await` is a postfix operation: `(bar()).await`
30
31error: incorrect use of `await`
e1599b0c 32 --> $DIR/incorrect-syntax-suggestions.rs:29:13
48663c56
XL
33 |
34LL | let _ = await { bar() }?;
35 | ^^^^^^^^^^^^^^^ help: `await` is a postfix operation: `{ bar() }.await`
36
37error: incorrect use of `await`
e1599b0c 38 --> $DIR/incorrect-syntax-suggestions.rs:33:14
48663c56
XL
39 |
40LL | let _ = (await bar())?;
41 | ^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`
42
43error: incorrect use of `await`
e1599b0c 44 --> $DIR/incorrect-syntax-suggestions.rs:37:24
48663c56
XL
45 |
46LL | let _ = bar().await();
47 | ^^ help: `await` is not a method call, remove the parentheses
48
49error: incorrect use of `await`
e1599b0c 50 --> $DIR/incorrect-syntax-suggestions.rs:41:24
48663c56
XL
51 |
52LL | let _ = bar().await()?;
53 | ^^ help: `await` is not a method call, remove the parentheses
54
55error: incorrect use of `await`
e1599b0c 56 --> $DIR/incorrect-syntax-suggestions.rs:53:13
48663c56
XL
57 |
58LL | let _ = await bar();
59 | ^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`
60
61error: incorrect use of `await`
e1599b0c 62 --> $DIR/incorrect-syntax-suggestions.rs:58:13
48663c56
XL
63 |
64LL | let _ = await? bar();
65 | ^^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await?`
66
67error: incorrect use of `await`
e1599b0c 68 --> $DIR/incorrect-syntax-suggestions.rs:63:13
48663c56
XL
69 |
70LL | let _ = await bar()?;
71 | ^^^^^^^^^^^^ help: `await` is a postfix operation: `bar()?.await`
72
73error: incorrect use of `await`
ba9703b0 74 --> $DIR/incorrect-syntax-suggestions.rs:69:14
48663c56
XL
75 |
76LL | let _ = (await bar())?;
77 | ^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`
78
79error: incorrect use of `await`
ba9703b0 80 --> $DIR/incorrect-syntax-suggestions.rs:74:24
48663c56
XL
81 |
82LL | let _ = bar().await();
83 | ^^ help: `await` is not a method call, remove the parentheses
84
85error: incorrect use of `await`
ba9703b0 86 --> $DIR/incorrect-syntax-suggestions.rs:79:24
48663c56
XL
87 |
88LL | let _ = bar().await()?;
89 | ^^ help: `await` is not a method call, remove the parentheses
90
416331ca 91error: incorrect use of `await`
ba9703b0 92 --> $DIR/incorrect-syntax-suggestions.rs:107:13
416331ca
XL
93 |
94LL | let _ = await!(bar());
95 | ^^^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`
96
97error: incorrect use of `await`
ba9703b0 98 --> $DIR/incorrect-syntax-suggestions.rs:111:13
416331ca
XL
99 |
100LL | let _ = await!(bar())?;
101 | ^^^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`
102
103error: incorrect use of `await`
ba9703b0 104 --> $DIR/incorrect-syntax-suggestions.rs:116:17
416331ca
XL
105 |
106LL | let _ = await!(bar())?;
107 | ^^^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`
108
109error: incorrect use of `await`
ba9703b0 110 --> $DIR/incorrect-syntax-suggestions.rs:124:17
416331ca
XL
111 |
112LL | let _ = await!(bar())?;
113 | ^^^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`
114
48663c56 115error: expected expression, found `=>`
ba9703b0 116 --> $DIR/incorrect-syntax-suggestions.rs:132:25
48663c56
XL
117 |
118LL | match await { await => () }
119 | ----- ^^ expected expression
120 | |
121 | while parsing this incorrect await expression
122
123error: incorrect use of `await`
ba9703b0 124 --> $DIR/incorrect-syntax-suggestions.rs:132:11
48663c56
XL
125 |
126LL | match await { await => () }
127 | ^^^^^^^^^^^^^^^^^^^^^ help: `await` is a postfix operation: `{ await => () }.await`
128
129error: expected one of `.`, `?`, `{`, or an operator, found `}`
ba9703b0 130 --> $DIR/incorrect-syntax-suggestions.rs:135:1
48663c56
XL
131 |
132LL | match await { await => () }
60c5eb7d 133 | ----- - expected one of `.`, `?`, `{`, or an operator
48663c56
XL
134 | |
135 | while parsing this match expression
136...
137LL | }
138 | ^ unexpected token
139
140error[E0728]: `await` is only allowed inside `async` functions and blocks
e1599b0c 141 --> $DIR/incorrect-syntax-suggestions.rs:53:13
48663c56
XL
142 |
143LL | fn foo9() -> Result<(), ()> {
144 | ---- this is not `async`
145LL | let _ = await bar();
146 | ^^^^^^^^^^^ only allowed inside `async` functions and blocks
147
148error[E0728]: `await` is only allowed inside `async` functions and blocks
e1599b0c 149 --> $DIR/incorrect-syntax-suggestions.rs:58:13
48663c56
XL
150 |
151LL | fn foo10() -> Result<(), ()> {
152 | ----- this is not `async`
153LL | let _ = await? bar();
154 | ^^^^^^^^^^^^ only allowed inside `async` functions and blocks
155
156error[E0728]: `await` is only allowed inside `async` functions and blocks
e1599b0c 157 --> $DIR/incorrect-syntax-suggestions.rs:63:13
48663c56
XL
158 |
159LL | fn foo11() -> Result<(), ()> {
160 | ----- this is not `async`
161LL | let _ = await bar()?;
162 | ^^^^^^^^^^^^ only allowed inside `async` functions and blocks
163
164error[E0728]: `await` is only allowed inside `async` functions and blocks
ba9703b0 165 --> $DIR/incorrect-syntax-suggestions.rs:69:14
48663c56
XL
166 |
167LL | fn foo12() -> Result<(), ()> {
168 | ----- this is not `async`
169LL | let _ = (await bar())?;
170 | ^^^^^^^^^^^ only allowed inside `async` functions and blocks
171
172error[E0728]: `await` is only allowed inside `async` functions and blocks
ba9703b0 173 --> $DIR/incorrect-syntax-suggestions.rs:74:13
48663c56
XL
174 |
175LL | fn foo13() -> Result<(), ()> {
176 | ----- this is not `async`
177LL | let _ = bar().await();
178 | ^^^^^^^^^^^ only allowed inside `async` functions and blocks
179
180error[E0728]: `await` is only allowed inside `async` functions and blocks
ba9703b0 181 --> $DIR/incorrect-syntax-suggestions.rs:79:13
48663c56
XL
182 |
183LL | fn foo14() -> Result<(), ()> {
184 | ----- this is not `async`
185LL | let _ = bar().await()?;
186 | ^^^^^^^^^^^ only allowed inside `async` functions and blocks
187
188error[E0728]: `await` is only allowed inside `async` functions and blocks
ba9703b0 189 --> $DIR/incorrect-syntax-suggestions.rs:84:13
48663c56
XL
190 |
191LL | fn foo15() -> Result<(), ()> {
192 | ----- this is not `async`
193LL | let _ = bar().await;
194 | ^^^^^^^^^^^ only allowed inside `async` functions and blocks
195
196error[E0728]: `await` is only allowed inside `async` functions and blocks
ba9703b0 197 --> $DIR/incorrect-syntax-suggestions.rs:88:13
48663c56
XL
198 |
199LL | fn foo16() -> Result<(), ()> {
200 | ----- this is not `async`
201LL | let _ = bar().await?;
202 | ^^^^^^^^^^^ only allowed inside `async` functions and blocks
203
204error[E0728]: `await` is only allowed inside `async` functions and blocks
ba9703b0 205 --> $DIR/incorrect-syntax-suggestions.rs:93:17
48663c56
XL
206 |
207LL | fn foo() -> Result<(), ()> {
208 | --- this is not `async`
209LL | let _ = bar().await?;
210 | ^^^^^^^^^^^ only allowed inside `async` functions and blocks
211
212error[E0728]: `await` is only allowed inside `async` functions and blocks
ba9703b0 213 --> $DIR/incorrect-syntax-suggestions.rs:100:17
48663c56
XL
214 |
215LL | let foo = || {
216 | -- this is not `async`
217LL | let _ = bar().await?;
218 | ^^^^^^^^^^^ only allowed inside `async` functions and blocks
219
416331ca 220error[E0728]: `await` is only allowed inside `async` functions and blocks
ba9703b0 221 --> $DIR/incorrect-syntax-suggestions.rs:116:17
416331ca
XL
222 |
223LL | fn foo() -> Result<(), ()> {
224 | --- this is not `async`
225LL | let _ = await!(bar())?;
226 | ^^^^^^^^^^^^^ only allowed inside `async` functions and blocks
227
228error[E0728]: `await` is only allowed inside `async` functions and blocks
ba9703b0 229 --> $DIR/incorrect-syntax-suggestions.rs:124:17
416331ca
XL
230 |
231LL | let foo = || {
232 | -- this is not `async`
233LL | let _ = await!(bar())?;
234 | ^^^^^^^^^^^^^ only allowed inside `async` functions and blocks
235
48663c56 236error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try`
e1599b0c 237 --> $DIR/incorrect-syntax-suggestions.rs:16:19
48663c56
XL
238 |
239LL | let _ = await bar()?;
240 | ^^^^^^ the `?` operator cannot be applied to type `impl std::future::Future`
241 |
242 = help: the trait `std::ops::Try` is not implemented for `impl std::future::Future`
243 = note: required by `std::ops::Try::into_result`
244
ba9703b0
XL
245error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try`
246 --> $DIR/incorrect-syntax-suggestions.rs:63:19
247 |
248LL | let _ = await bar()?;
249 | ^^^^^^ the `?` operator cannot be applied to type `impl std::future::Future`
250 |
251 = help: the trait `std::ops::Try` is not implemented for `impl std::future::Future`
252 = note: required by `std::ops::Try::into_result`
253
254error: aborting due to 36 previous errors
48663c56 255
e74abb32
XL
256Some errors have detailed explanations: E0277, E0728.
257For more information about an error, try `rustc --explain E0277`.