1 error: incorrect use of `await`
2 --> $DIR/incorrect-syntax-suggestions.rs:10:13
4 LL | let _ = await bar();
5 | ^^^^^^^^^^^ help: `await` is not a statement: `bar().await`
7 error: incorrect use of `await`
8 --> $DIR/incorrect-syntax-suggestions.rs:14:13
10 LL | let _ = await? bar();
11 | ^^^^^^^^^^^^ help: `await` is not a statement: `bar().await?`
13 error: incorrect use of `await`
14 --> $DIR/incorrect-syntax-suggestions.rs:18:13
16 LL | let _ = await bar()?;
17 | ^^^^^^^^^^^^ help: `await` is not a statement: `bar()?.await`
19 error: incorrect use of `await`
20 --> $DIR/incorrect-syntax-suggestions.rs:23:13
22 LL | let _ = await { bar() };
23 | ^^^^^^^^^^^^^^^ help: `await` is not a statement: `{ bar() }.await`
25 error: incorrect use of `await`
26 --> $DIR/incorrect-syntax-suggestions.rs:27:13
28 LL | let _ = await(bar());
29 | ^^^^^^^^^^^^ help: `await` is not a statement: `(bar()).await`
31 error: incorrect use of `await`
32 --> $DIR/incorrect-syntax-suggestions.rs:31:13
34 LL | let _ = await { bar() }?;
35 | ^^^^^^^^^^^^^^^ help: `await` is not a statement: `{ bar() }.await`
37 error: incorrect use of `await`
38 --> $DIR/incorrect-syntax-suggestions.rs:35:14
40 LL | let _ = (await bar())?;
41 | ^^^^^^^^^^^ help: `await` is not a statement: `bar().await`
43 error: incorrect use of `await`
44 --> $DIR/incorrect-syntax-suggestions.rs:39: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:43: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:55:13
58 LL | let _ = await bar();
59 | ^^^^^^^^^^^ help: `await` is not a statement: `bar().await`
61 error: incorrect use of `await`
62 --> $DIR/incorrect-syntax-suggestions.rs:60:13
64 LL | let _ = await? bar();
65 | ^^^^^^^^^^^^ help: `await` is not a statement: `bar().await?`
67 error: incorrect use of `await`
68 --> $DIR/incorrect-syntax-suggestions.rs:65:13
70 LL | let _ = await bar()?;
71 | ^^^^^^^^^^^^ help: `await` is not a statement: `bar()?.await`
73 error: incorrect use of `await`
74 --> $DIR/incorrect-syntax-suggestions.rs:70:14
76 LL | let _ = (await bar())?;
77 | ^^^^^^^^^^^ help: `await` is not a statement: `bar().await`
79 error: incorrect use of `await`
80 --> $DIR/incorrect-syntax-suggestions.rs:75: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:80:24
88 LL | let _ = bar().await()?;
89 | ^^ help: `await` is not a method call, remove the parentheses
91 error[E0728]: `await` is only allowed inside `async` functions and blocks
92 --> $DIR/incorrect-syntax-suggestions.rs:55:13
94 LL | fn foo9() -> Result<(), ()> {
95 | ---- this is not `async`
96 LL | let _ = await bar();
97 | ^^^^^^^^^^^ only allowed inside `async` functions and blocks
99 error[E0728]: `await` is only allowed inside `async` functions and blocks
100 --> $DIR/incorrect-syntax-suggestions.rs:60:13
102 LL | fn foo10() -> Result<(), ()> {
103 | ----- this is not `async`
104 LL | let _ = await? bar();
105 | ^^^^^^^^^^^^ only allowed inside `async` functions and blocks
107 error[E0728]: `await` is only allowed inside `async` functions and blocks
108 --> $DIR/incorrect-syntax-suggestions.rs:65:13
110 LL | fn foo11() -> Result<(), ()> {
111 | ----- this is not `async`
112 LL | let _ = await bar()?;
113 | ^^^^^^^^^^^^ only allowed inside `async` functions and blocks
115 error[E0728]: `await` is only allowed inside `async` functions and blocks
116 --> $DIR/incorrect-syntax-suggestions.rs:70:14
118 LL | fn foo12() -> Result<(), ()> {
119 | ----- this is not `async`
120 LL | let _ = (await bar())?;
121 | ^^^^^^^^^^^ only allowed inside `async` functions and blocks
123 error[E0728]: `await` is only allowed inside `async` functions and blocks
124 --> $DIR/incorrect-syntax-suggestions.rs:75:13
126 LL | fn foo13() -> Result<(), ()> {
127 | ----- this is not `async`
128 LL | let _ = bar().await();
129 | ^^^^^^^^^^^ only allowed inside `async` functions and blocks
131 error[E0728]: `await` is only allowed inside `async` functions and blocks
132 --> $DIR/incorrect-syntax-suggestions.rs:80:13
134 LL | fn foo14() -> Result<(), ()> {
135 | ----- this is not `async`
136 LL | let _ = bar().await()?;
137 | ^^^^^^^^^^^ only allowed inside `async` functions and blocks
139 error[E0728]: `await` is only allowed inside `async` functions and blocks
140 --> $DIR/incorrect-syntax-suggestions.rs:85:13
142 LL | fn foo15() -> Result<(), ()> {
143 | ----- this is not `async`
144 LL | let _ = bar().await;
145 | ^^^^^^^^^^^ only allowed inside `async` functions and blocks
147 error[E0728]: `await` is only allowed inside `async` functions and blocks
148 --> $DIR/incorrect-syntax-suggestions.rs:89:13
150 LL | fn foo16() -> Result<(), ()> {
151 | ----- this is not `async`
152 LL | let _ = bar().await?;
153 | ^^^^^^^^^^^ only allowed inside `async` functions and blocks
155 error[E0728]: `await` is only allowed inside `async` functions and blocks
156 --> $DIR/incorrect-syntax-suggestions.rs:94:17
158 LL | fn foo() -> Result<(), ()> {
159 | --- this is not `async`
160 LL | let _ = bar().await?;
161 | ^^^^^^^^^^^ only allowed inside `async` functions and blocks
163 error[E0728]: `await` is only allowed inside `async` functions and blocks
164 --> $DIR/incorrect-syntax-suggestions.rs:101:17
167 | -- this is not `async`
168 LL | let _ = bar().await?;
169 | ^^^^^^^^^^^ only allowed inside `async` functions and blocks
171 error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try`
172 --> $DIR/incorrect-syntax-suggestions.rs:18:19
174 LL | let _ = await bar()?;
175 | ^^^^^^ the `?` operator cannot be applied to type `impl std::future::Future`
177 = help: the trait `std::ops::Try` is not implemented for `impl std::future::Future`
178 = note: required by `std::ops::Try::into_result`
180 error: aborting due to 26 previous errors
182 For more information about this error, try `rustc --explain E0277`.