aboutsummaryrefslogtreecommitdiff
path: root/tests/ui/pin_project/invalid.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/pin_project/invalid.stderr')
-rw-r--r--tests/ui/pin_project/invalid.stderr200
1 files changed, 109 insertions, 91 deletions
diff --git a/tests/ui/pin_project/invalid.stderr b/tests/ui/pin_project/invalid.stderr
index 3c6af57..35552bf 100644
--- a/tests/ui/pin_project/invalid.stderr
+++ b/tests/ui/pin_project/invalid.stderr
@@ -64,42 +64,42 @@ error: #[pin] attribute may only be used on fields of structs or variants
82 | #[pin] //~ ERROR may only be used on fields of structs or variants
| ^^^^^^
+error: `Replace` argument was removed, use `project_replace` argument instead
+ --> $DIR/invalid.rs:91:19
+ |
+91 | #[pin_project(Replace)] //~ ERROR `Replace` argument was removed, use `project_replace` argument instead
+ | ^^^^^^^
+
error: expected identifier
- --> $DIR/invalid.rs:91:31
+ --> $DIR/invalid.rs:94:31
|
-91 | #[pin_project(UnsafeUnpin,,)] //~ ERROR expected identifier
+94 | #[pin_project(UnsafeUnpin,,)] //~ ERROR expected identifier
| ^
error: unexpected argument: Foo
- --> $DIR/invalid.rs:94:19
+ --> $DIR/invalid.rs:97:19
|
-94 | #[pin_project(Foo)] //~ ERROR unexpected argument
+97 | #[pin_project(Foo)] //~ ERROR unexpected argument
| ^^^
error: expected identifier
- --> $DIR/invalid.rs:97:19
- |
-97 | #[pin_project(,UnsafeUnpin)] //~ ERROR expected identifier
- | ^
+ --> $DIR/invalid.rs:100:19
+ |
+100 | #[pin_project(,UnsafeUnpin)] //~ ERROR expected identifier
+ | ^
error: expected `,`
- --> $DIR/invalid.rs:103:30
+ --> $DIR/invalid.rs:106:30
|
-103 | #[pin_project(PinnedDrop PinnedDrop)] //~ ERROR expected `,`
+106 | #[pin_project(PinnedDrop PinnedDrop)] //~ ERROR expected `,`
| ^^^^^^^^^^
error: duplicate `PinnedDrop` argument
- --> $DIR/invalid.rs:106:31
+ --> $DIR/invalid.rs:109:31
|
-106 | #[pin_project(PinnedDrop, PinnedDrop)] //~ ERROR duplicate `PinnedDrop` argument
+109 | #[pin_project(PinnedDrop, PinnedDrop)] //~ ERROR duplicate `PinnedDrop` argument
| ^^^^^^^^^^
-error: duplicate `Replace` argument
- --> $DIR/invalid.rs:109:28
- |
-109 | #[pin_project(Replace, Replace)] //~ ERROR duplicate `Replace` argument
- | ^^^^^^^
-
error: duplicate `UnsafeUnpin` argument
--> $DIR/invalid.rs:112:32
|
@@ -160,187 +160,205 @@ error: duplicate `project_replace` argument
139 | #[pin_project(project_replace = A, project_replace)] //~ ERROR duplicate `project_replace` argument
| ^^^^^^^^^^^^^^^
-error: arguments `PinnedDrop` and `Replace` are mutually exclusive
- --> $DIR/invalid.rs:145:19
- |
-145 | #[pin_project(PinnedDrop, Replace)] //~ ERROR arguments `PinnedDrop` and `Replace` are mutually exclusive
- | ^^^^^^^^^^
-
-error: arguments `PinnedDrop` and `Replace` are mutually exclusive
- --> $DIR/invalid.rs:148:41
- |
-148 | #[pin_project(Replace, UnsafeUnpin, PinnedDrop)] //~ ERROR arguments `PinnedDrop` and `Replace` are mutually exclusive
- | ^^^^^^^^^^
-
error: arguments `PinnedDrop` and `project_replace` are mutually exclusive
- --> $DIR/invalid.rs:151:19
+ --> $DIR/invalid.rs:145:19
|
-151 | #[pin_project(PinnedDrop, project_replace)] //~ ERROR arguments `PinnedDrop` and `project_replace` are mutually exclusive
+145 | #[pin_project(PinnedDrop, project_replace)] //~ ERROR arguments `PinnedDrop` and `project_replace` are mutually exclusive
| ^^^^^^^^^^
error: arguments `PinnedDrop` and `project_replace` are mutually exclusive
- --> $DIR/invalid.rs:154:49
+ --> $DIR/invalid.rs:148:49
|
-154 | #[pin_project(project_replace, UnsafeUnpin, PinnedDrop)] //~ ERROR arguments `PinnedDrop` and `project_replace` are mutually exclusive
+148 | #[pin_project(project_replace, UnsafeUnpin, PinnedDrop)] //~ ERROR arguments `PinnedDrop` and `project_replace` are mutually exclusive
| ^^^^^^^^^^
error: arguments `UnsafeUnpin` and `!Unpin` are mutually exclusive
- --> $DIR/invalid.rs:163:19
+ --> $DIR/invalid.rs:151:19
|
-163 | #[pin_project(UnsafeUnpin, !Unpin)] //~ ERROR arguments `UnsafeUnpin` and `!Unpin` are mutually exclusive
+151 | #[pin_project(UnsafeUnpin, !Unpin)] //~ ERROR arguments `UnsafeUnpin` and `!Unpin` are mutually exclusive
| ^^^^^^^^^^^
error: arguments `UnsafeUnpin` and `!Unpin` are mutually exclusive
- --> $DIR/invalid.rs:166:39
+ --> $DIR/invalid.rs:154:39
|
-166 | #[pin_project(!Unpin, PinnedDrop, UnsafeUnpin)] //~ ERROR arguments `UnsafeUnpin` and `!Unpin` are mutually exclusive
+154 | #[pin_project(!Unpin, PinnedDrop, UnsafeUnpin)] //~ ERROR arguments `UnsafeUnpin` and `!Unpin` are mutually exclusive
| ^^^^^^^^^^^
error: expected `!Unpin`, found `!`
- --> $DIR/invalid.rs:169:19
+ --> $DIR/invalid.rs:157:19
|
-169 | #[pin_project(!)] //~ ERROR expected `!Unpin`, found `!`
+157 | #[pin_project(!)] //~ ERROR expected `!Unpin`, found `!`
| ^
error: unexpected argument: Unpin
- --> $DIR/invalid.rs:172:19
+ --> $DIR/invalid.rs:160:19
|
-172 | #[pin_project(Unpin)] //~ ERROR unexpected argument
+160 | #[pin_project(Unpin)] //~ ERROR unexpected argument
| ^^^^^
error: expected `project = <identifier>`, found `project`
- --> $DIR/invalid.rs:175:19
+ --> $DIR/invalid.rs:163:19
|
-175 | #[pin_project(project)] //~ ERROR expected `project = <identifier>`, found `project`
+163 | #[pin_project(project)] //~ ERROR expected `project = <identifier>`, found `project`
| ^^^^^^^
error: expected `project = <identifier>`, found `project =`
- --> $DIR/invalid.rs:178:19
+ --> $DIR/invalid.rs:166:19
|
-178 | #[pin_project(project = )] //~ ERROR expected `project = <identifier>`, found `project =`
+166 | #[pin_project(project = )] //~ ERROR expected `project = <identifier>`, found `project =`
| ^^^^^^^^^
error: expected identifier
- --> $DIR/invalid.rs:181:29
+ --> $DIR/invalid.rs:169:29
|
-181 | #[pin_project(project = !)] //~ ERROR expected identifier
+169 | #[pin_project(project = !)] //~ ERROR expected identifier
| ^
error: expected `project_ref = <identifier>`, found `project_ref`
- --> $DIR/invalid.rs:184:19
+ --> $DIR/invalid.rs:172:19
|
-184 | #[pin_project(project_ref)] //~ ERROR expected `project_ref = <identifier>`, found `project_ref`
+172 | #[pin_project(project_ref)] //~ ERROR expected `project_ref = <identifier>`, found `project_ref`
| ^^^^^^^^^^^
error: expected `project_ref = <identifier>`, found `project_ref =`
- --> $DIR/invalid.rs:187:19
+ --> $DIR/invalid.rs:175:19
|
-187 | #[pin_project(project_ref = )] //~ ERROR expected `project_ref = <identifier>`, found `project_ref =`
+175 | #[pin_project(project_ref = )] //~ ERROR expected `project_ref = <identifier>`, found `project_ref =`
| ^^^^^^^^^^^^^
error: expected identifier
- --> $DIR/invalid.rs:190:33
+ --> $DIR/invalid.rs:178:33
|
-190 | #[pin_project(project_ref = !)] //~ ERROR expected identifier
+178 | #[pin_project(project_ref = !)] //~ ERROR expected identifier
| ^
error: expected `project_replace = <identifier>`, found `project_replace =`
- --> $DIR/invalid.rs:196:19
+ --> $DIR/invalid.rs:184:19
|
-196 | #[pin_project(project_replace = )] //~ ERROR expected `project_replace = <identifier>`, found `project_replace =`
+184 | #[pin_project(project_replace = )] //~ ERROR expected `project_replace = <identifier>`, found `project_replace =`
| ^^^^^^^^^^^^^^^^^
error: expected identifier
- --> $DIR/invalid.rs:199:37
+ --> $DIR/invalid.rs:187:37
|
-199 | #[pin_project(project_replace = !)] //~ ERROR expected identifier
+187 | #[pin_project(project_replace = !)] //~ ERROR expected identifier
| ^
+error: `project_replace` argument requires a value when used on enums
+ --> $DIR/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
+ --> $DIR/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
+ --> $DIR/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
+ --> $DIR/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
- --> $DIR/invalid.rs:206:46
+ --> $DIR/invalid.rs:208:46
|
-206 | #[pin_project(project = A, project_ref = A)] //~ ERROR name `A` is already specified by `project` argument
+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
- --> $DIR/invalid.rs:209:50
+ --> $DIR/invalid.rs:211:50
|
-209 | #[pin_project(project = A, project_replace = A)] //~ ERROR name `A` is already specified by `project` argument
+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
- --> $DIR/invalid.rs:212:54
+ --> $DIR/invalid.rs:214:54
|
-212 | #[pin_project(project_ref = A, project_replace = A)] //~ ERROR name `A` is already specified by `project_ref` argument
+214 | #[pin_project(project_ref = A, project_replace = A)] //~ ERROR name `A` is already specified by `project_ref` argument
| ^
error: duplicate #[pin_project] attribute
- --> $DIR/invalid.rs:220:5
+ --> $DIR/invalid.rs:222:5
|
-220 | #[pin_project] //~ ERROR duplicate #[pin_project] attribute
+222 | #[pin_project] //~ ERROR duplicate #[pin_project] attribute
| ^^^^^^^^^^^^^^
error: #[pin_project] attribute may not be used on structs with zero fields
- --> $DIR/invalid.rs:228:19
+ --> $DIR/invalid.rs:230:19
|
-228 | struct Struct {} //~ ERROR may not be used on structs with zero fields
+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
- --> $DIR/invalid.rs:231:23
+ --> $DIR/invalid.rs:233:23
|
-231 | struct TupleStruct(); //~ ERROR may not be used on structs with zero fields
+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
- --> $DIR/invalid.rs:234:12
+ --> $DIR/invalid.rs:236:12
|
-234 | struct UnitStruct; //~ ERROR may not be used on structs with zero fields
+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
- --> $DIR/invalid.rs:237:20
+ --> $DIR/invalid.rs:239:20
|
-237 | enum EnumEmpty {} //~ ERROR may not be used on enums without variants
+239 | 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:241:13
+ --> $DIR/invalid.rs:243:13
|
-241 | V = 2, //~ ERROR may not be used on enums with discriminants
+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
- --> $DIR/invalid.rs:246:9
+ --> $DIR/invalid.rs:248:9
|
-246 | / Unit, //~ ERROR may not be used on enums with zero fields
-247 | | Tuple(),
-248 | | Struct {},
+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
- --> $DIR/invalid.rs:252:5
+ --> $DIR/invalid.rs:254:5
|
-252 | / union Union {
-253 | | //~^ ERROR may only be used on structs or enums
-254 | | f: (),
-255 | | }
+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
+ --> $DIR/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
- --> $DIR/invalid.rs:263:12
+ --> $DIR/invalid.rs:268:12
|
-263 | #[repr(packed)]
+268 | #[repr(packed)]
| ^^^^^^
error: #[pin_project] attribute may not be used on #[repr(packed)] types
- --> $DIR/invalid.rs:267:12
+ --> $DIR/invalid.rs:272:12
|
-267 | #[repr(packed)]
+272 | #[repr(packed)]
| ^^^^^^
error: #[pin_project] attribute may not be used on #[repr(packed)] types
- --> $DIR/invalid.rs:271:12
+ --> $DIR/invalid.rs:276:12
|
-271 | #[repr(packed)]
+276 | #[repr(packed)]
| ^^^^^^