summaryrefslogtreecommitdiffstats
path: root/tests/ui/async-await/await-keyword/incorrect-syntax-suggestions.stderr
blob: 928eb0b821db13fab086fd58b68dddf3b04696ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
error: incorrect use of `await`
  --> $DIR/incorrect-syntax-suggestions.rs:8:13
   |
LL |     let _ = await bar();
   |             ^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`

error: incorrect use of `await`
  --> $DIR/incorrect-syntax-suggestions.rs:12:13
   |
LL |     let _ = await? bar();
   |             ^^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await?`

error: incorrect use of `await`
  --> $DIR/incorrect-syntax-suggestions.rs:16:13
   |
LL |     let _ = await bar()?;
   |             ^^^^^^^^^^^^ help: `await` is a postfix operation: `bar()?.await`

error: incorrect use of `await`
  --> $DIR/incorrect-syntax-suggestions.rs:20:13
   |
LL |     let _ = await { bar() };
   |             ^^^^^^^^^^^^^^^ help: `await` is a postfix operation: `{ bar() }.await`

error: incorrect use of `await`
  --> $DIR/incorrect-syntax-suggestions.rs:24:13
   |
LL |     let _ = await(bar());
   |             ^^^^^^^^^^^^ help: `await` is a postfix operation: `(bar()).await`

error: incorrect use of `await`
  --> $DIR/incorrect-syntax-suggestions.rs:28:13
   |
LL |     let _ = await { bar() }?;
   |             ^^^^^^^^^^^^^^^ help: `await` is a postfix operation: `{ bar() }.await`

error: incorrect use of `await`
  --> $DIR/incorrect-syntax-suggestions.rs:32:14
   |
LL |     let _ = (await bar())?;
   |              ^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`

error: incorrect use of `await`
  --> $DIR/incorrect-syntax-suggestions.rs:36:24
   |
LL |     let _ = bar().await();
   |                        ^^ help: `await` is not a method call, remove the parentheses

error: incorrect use of `await`
  --> $DIR/incorrect-syntax-suggestions.rs:40:24
   |
LL |     let _ = bar().await()?;
   |                        ^^ help: `await` is not a method call, remove the parentheses

error: incorrect use of `await`
  --> $DIR/incorrect-syntax-suggestions.rs:52:13
   |
LL |     let _ = await bar();
   |             ^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`

error: incorrect use of `await`
  --> $DIR/incorrect-syntax-suggestions.rs:56:13
   |
LL |     let _ = await? bar();
   |             ^^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await?`

error: incorrect use of `await`
  --> $DIR/incorrect-syntax-suggestions.rs:60:13
   |
LL |     let _ = await bar()?;
   |             ^^^^^^^^^^^^ help: `await` is a postfix operation: `bar()?.await`

error: incorrect use of `await`
  --> $DIR/incorrect-syntax-suggestions.rs:64:14
   |
LL |     let _ = (await bar())?;
   |              ^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`

error: incorrect use of `await`
  --> $DIR/incorrect-syntax-suggestions.rs:68:24
   |
LL |     let _ = bar().await();
   |                        ^^ help: `await` is not a method call, remove the parentheses

error: incorrect use of `await`
  --> $DIR/incorrect-syntax-suggestions.rs:73:24
   |
LL |     let _ = bar().await()?;
   |                        ^^ help: `await` is not a method call, remove the parentheses

error: incorrect use of `await`
  --> $DIR/incorrect-syntax-suggestions.rs:101:13
   |
LL |     let _ = await!(bar());
   |             ^^^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`

error: incorrect use of `await`
  --> $DIR/incorrect-syntax-suggestions.rs:105:13
   |
LL |     let _ = await!(bar())?;
   |             ^^^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`

error: incorrect use of `await`
  --> $DIR/incorrect-syntax-suggestions.rs:110:17
   |
LL |         let _ = await!(bar())?;
   |                 ^^^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`

error: incorrect use of `await`
  --> $DIR/incorrect-syntax-suggestions.rs:117:17
   |
LL |         let _ = await!(bar())?;
   |                 ^^^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`

error: expected expression, found `=>`
  --> $DIR/incorrect-syntax-suggestions.rs:124:25
   |
LL |     match await { await => () }
   |                   ----- ^^ expected expression
   |                   |
   |                   while parsing this incorrect await expression

error: incorrect use of `await`
  --> $DIR/incorrect-syntax-suggestions.rs:124:11
   |
LL |     match await { await => () }
   |           ^^^^^^^^^^^^^^^^^^^^^ help: `await` is a postfix operation: `{ await => () }.await`

error: expected one of `.`, `?`, `{`, or an operator, found `}`
  --> $DIR/incorrect-syntax-suggestions.rs:127:1
   |
LL |     match await { await => () }
   |     -----                      - expected one of `.`, `?`, `{`, or an operator
   |     |
   |     while parsing this `match` expression
...
LL | }
   | ^ unexpected token

error[E0728]: `await` is only allowed inside `async` functions and blocks
  --> $DIR/incorrect-syntax-suggestions.rs:68:19
   |
LL | fn foo13() -> Result<(), ()> {
   |    ----- this is not `async`
LL |     let _ = bar().await();
   |                   ^^^^^ only allowed inside `async` functions and blocks

error[E0728]: `await` is only allowed inside `async` functions and blocks
  --> $DIR/incorrect-syntax-suggestions.rs:73:19
   |
LL | fn foo14() -> Result<(), ()> {
   |    ----- this is not `async`
LL |     let _ = bar().await()?;
   |                   ^^^^^ only allowed inside `async` functions and blocks

error[E0728]: `await` is only allowed inside `async` functions and blocks
  --> $DIR/incorrect-syntax-suggestions.rs:78:19
   |
LL | fn foo15() -> Result<(), ()> {
   |    ----- this is not `async`
LL |     let _ = bar().await;
   |                   ^^^^^ only allowed inside `async` functions and blocks

error[E0728]: `await` is only allowed inside `async` functions and blocks
  --> $DIR/incorrect-syntax-suggestions.rs:82:19
   |
LL | fn foo16() -> Result<(), ()> {
   |    ----- this is not `async`
LL |     let _ = bar().await?;
   |                   ^^^^^ only allowed inside `async` functions and blocks

error[E0728]: `await` is only allowed inside `async` functions and blocks
  --> $DIR/incorrect-syntax-suggestions.rs:87:23
   |
LL |     fn foo() -> Result<(), ()> {
   |        --- this is not `async`
LL |         let _ = bar().await?;
   |                       ^^^^^ only allowed inside `async` functions and blocks

error[E0728]: `await` is only allowed inside `async` functions and blocks
  --> $DIR/incorrect-syntax-suggestions.rs:94:23
   |
LL |     let foo = || {
   |               -- this is not `async`
LL |         let _ = bar().await?;
   |                       ^^^^^ only allowed inside `async` functions and blocks

error: aborting due to 28 previous errors

For more information about this error, try `rustc --explain E0728`.