365 lines
14 KiB
Plaintext
365 lines
14 KiB
Plaintext
error: unexpected token in attribute
|
|
--> tests/ui/pin_project/invalid.rs:8:14
|
|
|
|
|
8 | #[pin()] //~ ERROR unexpected token in attribute
|
|
| ^
|
|
|
|
error: unexpected token in attribute
|
|
--> tests/ui/pin_project/invalid.rs:13:29
|
|
|
|
|
13 | struct TupleStruct(#[pin(foo)] ()); //~ ERROR unexpected token in attribute
|
|
| ^
|
|
|
|
error: unexpected token in attribute
|
|
--> tests/ui/pin_project/invalid.rs:17:16
|
|
|
|
|
17 | V(#[pin(foo)] ()), //~ ERROR unexpected token in attribute
|
|
| ^
|
|
|
|
error: unexpected token in attribute
|
|
--> tests/ui/pin_project/invalid.rs:23:18
|
|
|
|
|
23 | #[pin(foo)] //~ ERROR unexpected token in attribute
|
|
| ^
|
|
|
|
error: duplicate #[pin] attribute
|
|
--> tests/ui/pin_project/invalid.rs:35:9
|
|
|
|
|
35 | #[pin] //~ ERROR duplicate #[pin] attribute
|
|
| ^^^^^^
|
|
|
|
error: duplicate #[pin] attribute
|
|
--> tests/ui/pin_project/invalid.rs:42:9
|
|
|
|
|
42 | #[pin]
|
|
| ^^^^^^
|
|
|
|
error: duplicate #[pin] attribute
|
|
--> tests/ui/pin_project/invalid.rs:51:13
|
|
|
|
|
51 | #[pin]
|
|
| ^^^^^^
|
|
|
|
error: duplicate #[pin] attribute
|
|
--> tests/ui/pin_project/invalid.rs:61:13
|
|
|
|
|
61 | #[pin] //~ ERROR duplicate #[pin] attribute
|
|
| ^^^^^^
|
|
|
|
error: #[pin] attribute may only be used on fields of structs or variants
|
|
--> tests/ui/pin_project/invalid.rs:71:5
|
|
|
|
|
71 | #[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:79:9
|
|
|
|
|
79 | #[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:84:5
|
|
|
|
|
84 | #[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:93:19
|
|
|
|
|
93 | #[pin_project(Replace)] //~ ERROR `Replace` argument was removed, use `project_replace` argument instead
|
|
| ^^^^^^^
|
|
|
|
error: expected identifier
|
|
--> tests/ui/pin_project/invalid.rs:96:31
|
|
|
|
|
96 | #[pin_project(UnsafeUnpin,,)] //~ ERROR expected identifier
|
|
| ^
|
|
|
|
error: unexpected argument: Foo
|
|
--> tests/ui/pin_project/invalid.rs:99:19
|
|
|
|
|
99 | #[pin_project(Foo)] //~ ERROR unexpected argument
|
|
| ^^^
|
|
|
|
error: expected identifier
|
|
--> tests/ui/pin_project/invalid.rs:102:19
|
|
|
|
|
102 | #[pin_project(,UnsafeUnpin)] //~ ERROR expected identifier
|
|
| ^
|
|
|
|
error: expected `,`
|
|
--> tests/ui/pin_project/invalid.rs:108:30
|
|
|
|
|
108 | #[pin_project(PinnedDrop PinnedDrop)] //~ ERROR expected `,`
|
|
| ^^^^^^^^^^
|
|
|
|
error: duplicate `PinnedDrop` argument
|
|
--> tests/ui/pin_project/invalid.rs:111:31
|
|
|
|
|
111 | #[pin_project(PinnedDrop, PinnedDrop)] //~ ERROR duplicate `PinnedDrop` argument
|
|
| ^^^^^^^^^^
|
|
|
|
error: duplicate `UnsafeUnpin` argument
|
|
--> tests/ui/pin_project/invalid.rs:114:32
|
|
|
|
|
114 | #[pin_project(UnsafeUnpin, UnsafeUnpin)] //~ ERROR duplicate `UnsafeUnpin` argument
|
|
| ^^^^^^^^^^^
|
|
|
|
error: duplicate `!Unpin` argument
|
|
--> tests/ui/pin_project/invalid.rs:117:27
|
|
|
|
|
117 | #[pin_project(!Unpin, !Unpin)] //~ ERROR duplicate `!Unpin` argument
|
|
| ^^^^^^
|
|
|
|
error: duplicate `UnsafeUnpin` argument
|
|
--> tests/ui/pin_project/invalid.rs:120:44
|
|
|
|
|
120 | #[pin_project(PinnedDrop, UnsafeUnpin, UnsafeUnpin)] //~ ERROR duplicate `UnsafeUnpin` argument
|
|
| ^^^^^^^^^^^
|
|
|
|
error: duplicate `PinnedDrop` argument
|
|
--> tests/ui/pin_project/invalid.rs:123:44
|
|
|
|
|
123 | #[pin_project(PinnedDrop, UnsafeUnpin, PinnedDrop, UnsafeUnpin)] //~ ERROR duplicate `PinnedDrop` argument
|
|
| ^^^^^^^^^^
|
|
|
|
error: duplicate `project` argument
|
|
--> tests/ui/pin_project/invalid.rs:126:32
|
|
|
|
|
126 | #[pin_project(project = A, project = B)] //~ ERROR duplicate `project` argument
|
|
| ^^^^^^^^^^^
|
|
|
|
error: duplicate `project` argument
|
|
--> tests/ui/pin_project/invalid.rs:129:49
|
|
|
|
|
129 | #[pin_project(project = A, project_ref = A, project = B)] //~ ERROR duplicate `project` argument
|
|
| ^^^^^^^^^^^
|
|
|
|
error: duplicate `project_ref` argument
|
|
--> tests/ui/pin_project/invalid.rs:132:36
|
|
|
|
|
132 | #[pin_project(project_ref = A, project_ref = B)] //~ ERROR duplicate `project_ref` argument
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
error: duplicate `project_replace` argument
|
|
--> tests/ui/pin_project/invalid.rs:135:40
|
|
|
|
|
135 | #[pin_project(project_replace = A, project_replace = B)] //~ ERROR duplicate `project_replace` argument
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: duplicate `project_replace` argument
|
|
--> tests/ui/pin_project/invalid.rs:138:36
|
|
|
|
|
138 | #[pin_project(project_replace, project_replace = B)] //~ ERROR duplicate `project_replace` argument
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: duplicate `project_replace` argument
|
|
--> tests/ui/pin_project/invalid.rs:141:40
|
|
|
|
|
141 | #[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:147:19
|
|
|
|
|
147 | #[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:150:49
|
|
|
|
|
150 | #[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:153:19
|
|
|
|
|
153 | #[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:156:39
|
|
|
|
|
156 | #[pin_project(!Unpin, PinnedDrop, UnsafeUnpin)] //~ ERROR arguments `UnsafeUnpin` and `!Unpin` are mutually exclusive
|
|
| ^^^^^^^^^^^
|
|
|
|
error: expected `!Unpin`, found `!`
|
|
--> tests/ui/pin_project/invalid.rs:159:19
|
|
|
|
|
159 | #[pin_project(!)] //~ ERROR expected `!Unpin`, found `!`
|
|
| ^
|
|
|
|
error: unexpected argument: Unpin
|
|
--> tests/ui/pin_project/invalid.rs:162:19
|
|
|
|
|
162 | #[pin_project(Unpin)] //~ ERROR unexpected argument
|
|
| ^^^^^
|
|
|
|
error: expected `project = <identifier>`, found `project`
|
|
--> tests/ui/pin_project/invalid.rs:165:19
|
|
|
|
|
165 | #[pin_project(project)] //~ ERROR expected `project = <identifier>`, found `project`
|
|
| ^^^^^^^
|
|
|
|
error: expected `project = <identifier>`, found `project =`
|
|
--> tests/ui/pin_project/invalid.rs:168:19
|
|
|
|
|
168 | #[pin_project(project = )] //~ ERROR expected `project = <identifier>`, found `project =`
|
|
| ^^^^^^^^^
|
|
|
|
error: expected identifier
|
|
--> tests/ui/pin_project/invalid.rs:171:29
|
|
|
|
|
171 | #[pin_project(project = !)] //~ ERROR expected identifier
|
|
| ^
|
|
|
|
error: expected `project_ref = <identifier>`, found `project_ref`
|
|
--> tests/ui/pin_project/invalid.rs:174:19
|
|
|
|
|
174 | #[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:177:19
|
|
|
|
|
177 | #[pin_project(project_ref = )] //~ ERROR expected `project_ref = <identifier>`, found `project_ref =`
|
|
| ^^^^^^^^^^^^^
|
|
|
|
error: expected identifier
|
|
--> tests/ui/pin_project/invalid.rs:180:33
|
|
|
|
|
180 | #[pin_project(project_ref = !)] //~ ERROR expected identifier
|
|
| ^
|
|
|
|
error: expected `project_replace = <identifier>`, found `project_replace =`
|
|
--> tests/ui/pin_project/invalid.rs:186:19
|
|
|
|
|
186 | #[pin_project(project_replace = )] //~ ERROR expected `project_replace = <identifier>`, found `project_replace =`
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
error: expected identifier
|
|
--> tests/ui/pin_project/invalid.rs:189:37
|
|
|
|
|
189 | #[pin_project(project_replace = !)] //~ ERROR expected identifier
|
|
| ^
|
|
|
|
error: `project_replace` argument requires a value when used on enums
|
|
--> tests/ui/pin_project/invalid.rs:192:19
|
|
|
|
|
192 | #[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:201:29
|
|
|
|
|
201 | #[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:204:33
|
|
|
|
|
204 | #[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:207:37
|
|
|
|
|
207 | #[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:210:46
|
|
|
|
|
210 | #[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:213:50
|
|
|
|
|
213 | #[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:216:54
|
|
|
|
|
216 | #[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:224:5
|
|
|
|
|
224 | #[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:232:19
|
|
|
|
|
232 | 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:235:23
|
|
|
|
|
235 | 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:238:12
|
|
|
|
|
238 | 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:241:20
|
|
|
|
|
241 | 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:245:13
|
|
|
|
|
245 | 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:250:9
|
|
|
|
|
250 | / Unit, //~ ERROR may not be used on enums with zero fields
|
|
251 | | Tuple(),
|
|
252 | | Struct {},
|
|
| |__________________^
|
|
|
|
error: #[pin_project] attribute may only be used on structs or enums
|
|
--> tests/ui/pin_project/invalid.rs:256:5
|
|
|
|
|
256 | / union Union {
|
|
257 | | //~^ ERROR may only be used on structs or enums
|
|
258 | | f: (),
|
|
259 | | }
|
|
| |_____^
|
|
|
|
error: #[pin_project] attribute may only be used on structs or enums
|
|
--> tests/ui/pin_project/invalid.rs:262:5
|
|
|
|
|
262 | 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:270:12
|
|
|
|
|
270 | #[repr(packed)]
|
|
| ^^^^^^
|
|
|
|
error: #[pin_project] attribute may not be used on #[repr(packed)] types
|
|
--> tests/ui/pin_project/invalid.rs:274:12
|
|
|
|
|
274 | #[repr(packed)]
|
|
| ^^^^^^
|
|
|
|
error: #[pin_project] attribute may not be used on #[repr(packed)] types
|
|
--> tests/ui/pin_project/invalid.rs:278:12
|
|
|
|
|
278 | #[repr(packed)]
|
|
| ^^^^^^
|