aboutsummaryrefslogtreecommitdiff
path: root/tests/ui/pin_project/invalid.stderr
blob: ec5205f564920a964c1bdbd28ab9f6e5ef6c5948 (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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
error: unexpected token in attribute
 --> tests/ui/pin_project/invalid.rs:6:14
  |
6 |         #[pin()] //~ ERROR unexpected token in attribute
  |              ^

error: unexpected token in attribute
  --> tests/ui/pin_project/invalid.rs:11:29
   |
11 |     struct TupleStruct(#[pin(foo)] ()); //~ ERROR unexpected token in attribute
   |                             ^

error: unexpected token in attribute
  --> tests/ui/pin_project/invalid.rs:15:16
   |
15 |         V(#[pin(foo)] ()), //~ ERROR unexpected token in attribute
   |                ^

error: unexpected token in attribute
  --> tests/ui/pin_project/invalid.rs:21:18
   |
21 |             #[pin(foo)] //~ ERROR unexpected token in attribute
   |                  ^

error: duplicate #[pin] attribute
  --> tests/ui/pin_project/invalid.rs:33:9
   |
33 |         #[pin] //~ ERROR duplicate #[pin] attribute
   |         ^^^^^^

error: duplicate #[pin] attribute
  --> tests/ui/pin_project/invalid.rs:40:9
   |
40 |         #[pin]
   |         ^^^^^^

error: duplicate #[pin] attribute
  --> tests/ui/pin_project/invalid.rs:49:13
   |
49 |             #[pin]
   |             ^^^^^^

error: duplicate #[pin] attribute
  --> tests/ui/pin_project/invalid.rs:59:13
   |
59 |             #[pin] //~ ERROR duplicate #[pin] attribute
   |             ^^^^^^

error: #[pin] attribute may only be used on fields of structs or variants
  --> tests/ui/pin_project/invalid.rs:69:5
   |
69 |     #[pin] //~ ERROR may only be used on fields of structs or variants
   |     ^^^^^^

error: #[pin] attribute may only be used on fields of structs or variants
  --> tests/ui/pin_project/invalid.rs:77:9
   |
77 |         #[pin] //~ ERROR may only be used on fields of structs or variants
   |         ^^^^^^

error: #[pin] attribute may only be used on fields of structs or variants
  --> tests/ui/pin_project/invalid.rs:82:5
   |
82 |     #[pin] //~ ERROR may only be used on fields of structs or variants
   |     ^^^^^^

error: `Replace` argument was removed, use `project_replace` argument instead
  --> tests/ui/pin_project/invalid.rs:91:19
   |
91 |     #[pin_project(Replace)] //~ ERROR `Replace` argument was removed, use `project_replace` argument instead
   |                   ^^^^^^^

error: expected identifier
  --> tests/ui/pin_project/invalid.rs:94:31
   |
94 |     #[pin_project(UnsafeUnpin,,)] //~ ERROR expected identifier
   |                               ^

error: unexpected argument: Foo
  --> tests/ui/pin_project/invalid.rs:97:19
   |
97 |     #[pin_project(Foo)] //~ ERROR unexpected argument
   |                   ^^^

error: expected identifier
   --> tests/ui/pin_project/invalid.rs:100:19
    |
100 |     #[pin_project(,UnsafeUnpin)] //~ ERROR expected identifier
    |                   ^

error: expected `,`
   --> tests/ui/pin_project/invalid.rs:106:30
    |
106 |     #[pin_project(PinnedDrop PinnedDrop)] //~ ERROR expected `,`
    |                              ^^^^^^^^^^

error: duplicate `PinnedDrop` argument
   --> tests/ui/pin_project/invalid.rs:109:31
    |
109 |     #[pin_project(PinnedDrop, PinnedDrop)] //~ ERROR duplicate `PinnedDrop` argument
    |                               ^^^^^^^^^^

error: duplicate `UnsafeUnpin` argument
   --> tests/ui/pin_project/invalid.rs:112:32
    |
112 |     #[pin_project(UnsafeUnpin, UnsafeUnpin)] //~ ERROR duplicate `UnsafeUnpin` argument
    |                                ^^^^^^^^^^^

error: duplicate `!Unpin` argument
   --> tests/ui/pin_project/invalid.rs:115:27
    |
115 |     #[pin_project(!Unpin, !Unpin)] //~ ERROR duplicate `!Unpin` argument
    |                           ^^^^^^

error: duplicate `UnsafeUnpin` argument
   --> tests/ui/pin_project/invalid.rs:118:44
    |
118 |     #[pin_project(PinnedDrop, UnsafeUnpin, UnsafeUnpin)] //~ ERROR duplicate `UnsafeUnpin` argument
    |                                            ^^^^^^^^^^^

error: duplicate `PinnedDrop` argument
   --> tests/ui/pin_project/invalid.rs:121:44
    |
121 |     #[pin_project(PinnedDrop, UnsafeUnpin, PinnedDrop, UnsafeUnpin)] //~ ERROR duplicate `PinnedDrop` argument
    |                                            ^^^^^^^^^^

error: duplicate `project` argument
   --> tests/ui/pin_project/invalid.rs:124:32
    |
124 |     #[pin_project(project = A, project = B)] //~ ERROR duplicate `project` argument
    |                                ^^^^^^^^^^^

error: duplicate `project` argument
   --> tests/ui/pin_project/invalid.rs:127:49
    |
127 |     #[pin_project(project = A, project_ref = A, project = B)] //~ ERROR duplicate `project` argument
    |                                                 ^^^^^^^^^^^

error: duplicate `project_ref` argument
   --> tests/ui/pin_project/invalid.rs:130:36
    |
130 |     #[pin_project(project_ref = A, project_ref = B)] //~ ERROR duplicate `project_ref` argument
    |                                    ^^^^^^^^^^^^^^^

error: duplicate `project_replace` argument
   --> tests/ui/pin_project/invalid.rs:133:40
    |
133 |     #[pin_project(project_replace = A, project_replace = B)] //~ ERROR duplicate `project_replace` argument
    |                                        ^^^^^^^^^^^^^^^^^^^

error: duplicate `project_replace` argument
   --> tests/ui/pin_project/invalid.rs:136:36
    |
136 |     #[pin_project(project_replace, project_replace = B)] //~ ERROR duplicate `project_replace` argument
    |                                    ^^^^^^^^^^^^^^^^^^^

error: duplicate `project_replace` argument
   --> tests/ui/pin_project/invalid.rs:139:40
    |
139 |     #[pin_project(project_replace = A, project_replace)] //~ ERROR duplicate `project_replace` argument
    |                                        ^^^^^^^^^^^^^^^

error: arguments `PinnedDrop` and `project_replace` are mutually exclusive
   --> tests/ui/pin_project/invalid.rs:145:19
    |
145 |     #[pin_project(PinnedDrop, project_replace)] //~ ERROR arguments `PinnedDrop` and `project_replace` are mutually exclusive
    |                   ^^^^^^^^^^

error: arguments `PinnedDrop` and `project_replace` are mutually exclusive
   --> tests/ui/pin_project/invalid.rs:148:49
    |
148 |     #[pin_project(project_replace, UnsafeUnpin, PinnedDrop)] //~ ERROR arguments `PinnedDrop` and `project_replace` are mutually exclusive
    |                                                 ^^^^^^^^^^

error: arguments `UnsafeUnpin` and `!Unpin` are mutually exclusive
   --> tests/ui/pin_project/invalid.rs:151:19
    |
151 |     #[pin_project(UnsafeUnpin, !Unpin)] //~ ERROR arguments `UnsafeUnpin` and `!Unpin` are mutually exclusive
    |                   ^^^^^^^^^^^

error: arguments `UnsafeUnpin` and `!Unpin` are mutually exclusive
   --> tests/ui/pin_project/invalid.rs:154:39
    |
154 |     #[pin_project(!Unpin, PinnedDrop, UnsafeUnpin)] //~ ERROR arguments `UnsafeUnpin` and `!Unpin` are mutually exclusive
    |                                       ^^^^^^^^^^^

error: expected `!Unpin`, found `!`
   --> tests/ui/pin_project/invalid.rs:157:19
    |
157 |     #[pin_project(!)] //~ ERROR expected `!Unpin`, found `!`
    |                   ^

error: unexpected argument: Unpin
   --> tests/ui/pin_project/invalid.rs:160:19
    |
160 |     #[pin_project(Unpin)] //~ ERROR unexpected argument
    |                   ^^^^^

error: expected `project = <identifier>`, found `project`
   --> tests/ui/pin_project/invalid.rs:163:19
    |
163 |     #[pin_project(project)] //~ ERROR expected `project = <identifier>`, found `project`
    |                   ^^^^^^^

error: expected `project = <identifier>`, found `project =`
   --> tests/ui/pin_project/invalid.rs:166:19
    |
166 |     #[pin_project(project = )] //~ ERROR expected `project = <identifier>`, found `project =`
    |                   ^^^^^^^^^

error: expected identifier
   --> tests/ui/pin_project/invalid.rs:169:29
    |
169 |     #[pin_project(project = !)] //~ ERROR expected identifier
    |                             ^

error: expected `project_ref = <identifier>`, found `project_ref`
   --> tests/ui/pin_project/invalid.rs:172:19
    |
172 |     #[pin_project(project_ref)] //~ ERROR expected `project_ref = <identifier>`, found `project_ref`
    |                   ^^^^^^^^^^^

error: expected `project_ref = <identifier>`, found `project_ref =`
   --> tests/ui/pin_project/invalid.rs:175:19
    |
175 |     #[pin_project(project_ref = )] //~ ERROR expected `project_ref = <identifier>`, found `project_ref =`
    |                   ^^^^^^^^^^^^^

error: expected identifier
   --> tests/ui/pin_project/invalid.rs:178:33
    |
178 |     #[pin_project(project_ref = !)] //~ ERROR expected identifier
    |                                 ^

error: expected `project_replace = <identifier>`, found `project_replace =`
   --> tests/ui/pin_project/invalid.rs:184:19
    |
184 |     #[pin_project(project_replace = )] //~ ERROR expected `project_replace = <identifier>`, found `project_replace =`
    |                   ^^^^^^^^^^^^^^^^^

error: expected identifier
   --> tests/ui/pin_project/invalid.rs:187:37
    |
187 |     #[pin_project(project_replace = !)] //~ ERROR expected identifier
    |                                     ^

error: `project_replace` argument requires a value when used on enums
   --> tests/ui/pin_project/invalid.rs:190:19
    |
190 |     #[pin_project(project_replace)] //~ ERROR `project_replace` argument requires a value when used on enums
    |                   ^^^^^^^^^^^^^^^

error: name `OrigAndProj` is the same as the original type name
   --> tests/ui/pin_project/invalid.rs:199:29
    |
199 |     #[pin_project(project = OrigAndProj)] //~ ERROR name `OrigAndProj` is the same as the original type name
    |                             ^^^^^^^^^^^

error: name `OrigAndProjRef` is the same as the original type name
   --> tests/ui/pin_project/invalid.rs:202:33
    |
202 |     #[pin_project(project_ref = OrigAndProjRef)] //~ ERROR name `OrigAndProjRef` is the same as the original type name
    |                                 ^^^^^^^^^^^^^^

error: name `OrigAndProjOwn` is the same as the original type name
   --> tests/ui/pin_project/invalid.rs:205:37
    |
205 |     #[pin_project(project_replace = OrigAndProjOwn)] //~ ERROR name `OrigAndProjOwn` is the same as the original type name
    |                                     ^^^^^^^^^^^^^^

error: name `A` is already specified by `project` argument
   --> tests/ui/pin_project/invalid.rs:208:46
    |
208 |     #[pin_project(project = A, project_ref = A)] //~ ERROR name `A` is already specified by `project` argument
    |                                              ^

error: name `A` is already specified by `project` argument
   --> tests/ui/pin_project/invalid.rs:211:50
    |
211 |     #[pin_project(project = A, project_replace = A)] //~ ERROR name `A` is already specified by `project` argument
    |                                                  ^

error: name `A` is already specified by `project_ref` argument
   --> tests/ui/pin_project/invalid.rs:214:54
    |
214 |     #[pin_project(project_ref = A, project_replace = A)] //~ ERROR name `A` is already specified by `project_ref` argument
    |                                                      ^

error: duplicate #[pin_project] attribute
   --> tests/ui/pin_project/invalid.rs:222:5
    |
222 |     #[pin_project] //~ ERROR duplicate #[pin_project] attribute
    |     ^^^^^^^^^^^^^^

error: #[pin_project] attribute may not be used on structs with zero fields
   --> tests/ui/pin_project/invalid.rs:230:19
    |
230 |     struct Struct {} //~ ERROR may not be used on structs with zero fields
    |                   ^^

error: #[pin_project] attribute may not be used on structs with zero fields
   --> tests/ui/pin_project/invalid.rs:233:23
    |
233 |     struct TupleStruct(); //~ ERROR may not be used on structs with zero fields
    |                       ^^

error: #[pin_project] attribute may not be used on structs with zero fields
   --> tests/ui/pin_project/invalid.rs:236:12
    |
236 |     struct UnitStruct; //~ ERROR may not be used on structs with zero fields
    |            ^^^^^^^^^^

error: #[pin_project] attribute may not be used on enums without variants
   --> tests/ui/pin_project/invalid.rs:239:20
    |
239 |     enum EnumEmpty {} //~ ERROR may not be used on enums without variants
    |                    ^^

error: #[pin_project] attribute may not be used on enums with discriminants
   --> tests/ui/pin_project/invalid.rs:243:13
    |
243 |         V = 2, //~ ERROR may not be used on enums with discriminants
    |             ^

error: #[pin_project] attribute may not be used on enums with zero fields
   --> tests/ui/pin_project/invalid.rs:248:9
    |
248 | /         Unit, //~ ERROR may not be used on enums with zero fields
249 | |         Tuple(),
250 | |         Struct {},
    | |__________________^

error: #[pin_project] attribute may only be used on structs or enums
   --> tests/ui/pin_project/invalid.rs:254:5
    |
254 | /     union Union {
255 | |         //~^ ERROR may only be used on structs or enums
256 | |         f: (),
257 | |     }
    | |_____^

error: #[pin_project] attribute may only be used on structs or enums
   --> tests/ui/pin_project/invalid.rs:260:5
    |
260 |     impl Impl {} //~ ERROR may only be used on structs or enums
    |     ^^^^^^^^^^^^

error: #[pin_project] attribute may not be used on #[repr(packed)] types
   --> tests/ui/pin_project/invalid.rs:268:12
    |
268 |     #[repr(packed)]
    |            ^^^^^^

error: #[pin_project] attribute may not be used on #[repr(packed)] types
   --> tests/ui/pin_project/invalid.rs:272:12
    |
272 |     #[repr(packed)]
    |            ^^^^^^

error: #[pin_project] attribute may not be used on #[repr(packed)] types
   --> tests/ui/pin_project/invalid.rs:276:12
    |
276 |     #[repr(packed)]
    |            ^^^^^^