aboutsummaryrefslogtreecommitdiff
path: root/tests/ui/pin_project/invalid.stderr
blob: 95b57f0a7ac031e5f59ce6a46c4032937e6a51db (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
error: unexpected token: ()
 --> $DIR/invalid.rs:6:14
  |
6 |         #[pin()] //~ ERROR unexpected token
  |              ^^

error: unexpected token: (foo)
  --> $DIR/invalid.rs:11:29
   |
11 |     struct TupleStruct(#[pin(foo)] ()); //~ ERROR unexpected token
   |                             ^^^^^

error: unexpected token: (foo)
  --> $DIR/invalid.rs:15:16
   |
15 |         V(#[pin(foo)] ()), //~ ERROR unexpected token
   |                ^^^^^

error: unexpected token: (foo)
  --> $DIR/invalid.rs:21:18
   |
21 |             #[pin(foo)] //~ ERROR unexpected token
   |                  ^^^^^

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

error: duplicate #[pin] attribute
  --> $DIR/invalid.rs:40:9
   |
40 |         #[pin]
   |         ^^^^^^

error: duplicate #[pin] attribute
  --> $DIR/invalid.rs:49:13
   |
49 |             #[pin]
   |             ^^^^^^

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

error: #[pin] attribute may only be used on fields of structs or variants
  --> $DIR/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
  --> $DIR/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
  --> $DIR/invalid.rs:82:5
   |
82 |     #[pin] //~ ERROR may only be used on fields of structs or variants
   |     ^^^^^^

error: expected identifier
  --> $DIR/invalid.rs:91:31
   |
91 |     #[pin_project(UnsafeUnpin,,)] //~ ERROR expected identifier
   |                               ^

error: unexpected argument: Foo
  --> $DIR/invalid.rs:94:19
   |
94 |     #[pin_project(Foo)] //~ ERROR unexpected argument
   |                   ^^^

error: expected identifier
  --> $DIR/invalid.rs:97:19
   |
97 |     #[pin_project(,UnsafeUnpin)] //~ ERROR expected identifier
   |                   ^

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

error: duplicate `Replace` argument
   --> $DIR/invalid.rs:106:28
    |
106 |     #[pin_project(Replace, Replace)] //~ ERROR duplicate `Replace` argument
    |                            ^^^^^^^

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

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

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

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

error: arguments `PinnedDrop` and `Replace` are mutually exclusive
   --> $DIR/invalid.rs:121:19
    |
121 |     #[pin_project(PinnedDrop, Replace)] //~ ERROR arguments `PinnedDrop` and `Replace` are mutually exclusive
    |                   ^^^^^^^^^^

error: arguments `PinnedDrop` and `Replace` are mutually exclusive
   --> $DIR/invalid.rs:124:41
    |
124 |     #[pin_project(Replace, UnsafeUnpin, PinnedDrop)] //~ ERROR arguments `PinnedDrop` and `Replace` are mutually exclusive
    |                                         ^^^^^^^^^^

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

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

error: unexpected end of input, expected `Unpin`
   --> $DIR/invalid.rs:133:5
    |
133 |     #[pin_project(!)] //~ ERROR unexpected end of input, expected `Unpin`
    |     ^^^^^^^^^^^^^^^^^
    |
    = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: unexpected argument: Unpin
   --> $DIR/invalid.rs:136:19
    |
136 |     #[pin_project(Unpin)] //~ ERROR unexpected argument
    |                   ^^^^^

error: duplicate #[pin_project] attribute
   --> $DIR/invalid.rs:144:5
    |
144 |     #[pin_project] //~ ERROR duplicate #[pin_project] attribute
    |     ^^^^^^^^^^^^^^

error: #[pin_project] attribute may not be used on structs with zero fields
   --> $DIR/invalid.rs:152:19
    |
152 |     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
   --> $DIR/invalid.rs:155:23
    |
155 |     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
   --> $DIR/invalid.rs:158:12
    |
158 |     struct UnitStruct; //~ ERROR may not be used on structs with zero fields
    |            ^^^^^^^^^^

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

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

error: #[pin_project] attribute may not be used on enums with zero fields
   --> $DIR/invalid.rs:170:9
    |
170 | /         Unit, //~ ERROR may not be used on enums with zero fields
171 | |         Tuple(),
172 | |         Struct {},
    | |__________________^

error: #[pin_project] attribute may only be used on structs or enums
   --> $DIR/invalid.rs:176:5
    |
176 | /     union Union {
177 | |         //~^ ERROR may only be used on structs or enums
178 | |         f: (),
179 | |     }
    | |_____^

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

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

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