Visitar URL original
Update ui test to nightly-2021-12-26 · taiki-e/pin-project@c511a12 · GitHub
Skip to content

Commit c511a12

Browse files
committed
Update ui test to nightly-2021-12-26
1 parent 3b2e88c commit c511a12

63 files changed

Lines changed: 962 additions & 642 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/ci.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- uses: taiki-e/github-actions/install-rust@main
3838
with:
3939
toolchain: ${{ matrix.rust }}
40-
component: rustfmt
40+
component: rustfmt,rust-src
4141
- name: Pre Cache cargo-expand
4242
run: |
4343
mkdir -p .github/caching
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0599]: no method named `project` found for struct `Pin<&mut Foo<u8>>` in the current scope
2-
--> $DIR/cfg_attr-resolve.rs:10:31
2+
--> tests/ui/cfg/cfg_attr-resolve.rs:10:31
33
|
44
10 | let _x = Pin::new(&mut x).project(); //~ ERROR E0599
55
| ^^^^^^^ method not found in `Pin<&mut Foo<u8>>`

‎tests/ui/cfg/cfg_attr-type-mismatch.stderr‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0308]: mismatched types
2-
--> $DIR/cfg_attr-type-mismatch.rs:19:27
2+
--> tests/ui/cfg/cfg_attr-type-mismatch.rs:19:27
33
|
44
19 | let _: Pin<&mut u8> = x.inner; //~ ERROR E0308
55
| ------------ ^^^^^^^ expected struct `Pin`, found `&mut u8`
@@ -10,7 +10,7 @@ error[E0308]: mismatched types
1010
found mutable reference `&mut u8`
1111

1212
error[E0308]: mismatched types
13-
--> $DIR/cfg_attr-type-mismatch.rs:23:22
13+
--> tests/ui/cfg/cfg_attr-type-mismatch.rs:23:22
1414
|
1515
23 | let _: &mut u8 = x.inner; //~ ERROR E0308
1616
| ------- ^^^^^^^

‎tests/ui/cfg/cfg_attr-unpin.stderr‎

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,43 @@
11
error[E0277]: `PhantomPinned` cannot be unpinned
2-
--> $DIR/cfg_attr-unpin.rs:18:5
2+
--> tests/ui/cfg/cfg_attr-unpin.rs:18:5
33
|
4-
15 | fn is_unpin<T: Unpin>() {}
5-
| ----- required by this bound in `is_unpin`
6-
...
74
18 | is_unpin::<Foo<PhantomPinned>>(); // ERROR E0277
85
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ within `Foo<PhantomPinned>`, the trait `Unpin` is not implemented for `PhantomPinned`
96
|
10-
= note: required because it appears within the type `Foo<PhantomPinned>`
7+
= note: consider using `Box::pin`
8+
note: required because it appears within the type `Foo<PhantomPinned>`
9+
--> tests/ui/cfg/cfg_attr-unpin.rs:5:8
10+
|
11+
5 | struct Foo<T> {
12+
| ^^^
13+
note: required by a bound in `is_unpin`
14+
--> tests/ui/cfg/cfg_attr-unpin.rs:15:16
15+
|
16+
15 | fn is_unpin<T: Unpin>() {}
17+
| ^^^^^ required by this bound in `is_unpin`
1118

1219
error[E0277]: `PhantomPinned` cannot be unpinned
13-
--> $DIR/cfg_attr-unpin.rs:20:5
20+
--> tests/ui/cfg/cfg_attr-unpin.rs:20:5
1421
|
15-
15 | fn is_unpin<T: Unpin>() {}
16-
| ----- required by this bound in `is_unpin`
17-
...
1822
20 | is_unpin::<Bar<PhantomPinned>>(); //~ ERROR E0277
1923
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ within `__Bar<'_, PhantomPinned>`, the trait `Unpin` is not implemented for `PhantomPinned`
2024
|
21-
= note: required because it appears within the type `__Bar<'_, PhantomPinned>`
22-
= note: required because of the requirements on the impl of `Unpin` for `Bar<PhantomPinned>`
25+
= note: consider using `Box::pin`
26+
note: required because it appears within the type `__Bar<'_, PhantomPinned>`
27+
--> tests/ui/cfg/cfg_attr-unpin.rs:10:8
28+
|
29+
10 | struct Bar<T> {
30+
| ^^^
31+
note: required because of the requirements on the impl of `Unpin` for `Bar<PhantomPinned>`
32+
--> tests/ui/cfg/cfg_attr-unpin.rs:9:24
33+
|
34+
9 | #[cfg_attr(not(any()), pin_project)]
35+
| ^^^^^^^^^^^
36+
10 | struct Bar<T> {
37+
| ^^^^^^
38+
note: required by a bound in `is_unpin`
39+
--> tests/ui/cfg/cfg_attr-unpin.rs:15:16
40+
|
41+
15 | fn is_unpin<T: Unpin>() {}
42+
| ^^^^^ required by this bound in `is_unpin`
43+
= note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info)
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
error: #[pin_project] attribute may not be used on #[repr(packed)] types
2-
--> $DIR/packed_sneaky-span-issue-1.rs:8:1
2+
--> tests/ui/cfg/packed_sneaky-span-issue-1.rs:8:1
33
|
44
8 | #[hidden_repr(packed)]
55
| ^^^^^^^^^^^^^^^^^^^^^^
66
|
7-
= note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
7+
= note: this error originates in the attribute macro `hidden_repr` (in Nightly builds, run with -Z macro-backtrace for more info)
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
error: #[pin_project] attribute may not be used on #[repr(packed)] types
2-
--> $DIR/packed_sneaky-span-issue-2.rs:8:1
2+
--> tests/ui/cfg/packed_sneaky-span-issue-2.rs:8:1
33
|
44
8 | #[hidden_repr(packed)]
55
| ^^^^^^^^^^^^^^^^^^^^^^
66
|
7-
= note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
7+
= note: this error originates in the attribute macro `hidden_repr` (in Nightly builds, run with -Z macro-backtrace for more info)

‎tests/ui/cfg/packed_sneaky.stderr‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
error: #[pin_project] attribute may not be used on #[repr(packed)] types
2-
--> $DIR/packed_sneaky.rs:6:1
2+
--> tests/ui/cfg/packed_sneaky.rs:6:1
33
|
44
6 | #[hidden_repr_cfg_not_any(packed)] //~ ERROR may not be used on #[repr(packed)] types
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66
|
7-
= note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
7+
= note: this error originates in the attribute macro `hidden_repr_cfg_not_any` (in Nightly builds, run with -Z macro-backtrace for more info)

‎tests/ui/cfg/proper_unpin.stderr‎

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,25 @@
11
error[E0277]: `PhantomPinned` cannot be unpinned
2-
--> $DIR/proper_unpin.rs:27:5
2+
--> tests/ui/cfg/proper_unpin.rs:27:5
33
|
4-
22 | fn is_unpin<T: Unpin>() {}
5-
| ----- required by this bound in `is_unpin`
6-
...
74
27 | is_unpin::<Bar<PhantomPinned>>(); //~ ERROR E0277
85
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ within `__Bar<'_, PhantomPinned>`, the trait `Unpin` is not implemented for `PhantomPinned`
96
|
10-
= note: required because it appears within the type `__Bar<'_, PhantomPinned>`
11-
= note: required because of the requirements on the impl of `Unpin` for `Bar<PhantomPinned>`
7+
= note: consider using `Box::pin`
8+
note: required because it appears within the type `__Bar<'_, PhantomPinned>`
9+
--> tests/ui/cfg/proper_unpin.rs:14:8
10+
|
11+
14 | struct Bar<T> {
12+
| ^^^
13+
note: required because of the requirements on the impl of `Unpin` for `Bar<PhantomPinned>`
14+
--> tests/ui/cfg/proper_unpin.rs:13:1
15+
|
16+
13 | #[pin_project]
17+
| ^^^^^^^^^^^^^^
18+
14 | struct Bar<T> {
19+
| ^^^^^^
20+
note: required by a bound in `is_unpin`
21+
--> tests/ui/cfg/proper_unpin.rs:22:16
22+
|
23+
22 | fn is_unpin<T: Unpin>() {}
24+
| ^^^^^ required by this bound in `is_unpin`
25+
= note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info)

‎tests/ui/cfg/unsupported.stderr‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
error: #[pin_project] attribute may not be used on structs with zero fields
2-
--> $DIR/unsupported.rs:7:1
2+
--> tests/ui/cfg/unsupported.rs:7:15
33
|
4-
7 | / struct Struct {
4+
7 | struct Struct {
5+
| _______________^
56
8 | | #[cfg(any())]
67
9 | | #[pin]
78
10 | | f: u8,
Lines changed: 98 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,146 @@
11
error[E0277]: `PhantomPinned` cannot be unpinned
2-
--> $DIR/assert-not-unpin.rs:31:5
2+
--> tests/ui/not_unpin/assert-not-unpin.rs:31:5
33
|
4-
28 | fn is_unpin<T: Unpin>() {}
5-
| ----- required by this bound in `is_unpin`
6-
...
74
31 | is_unpin::<Foo<(), ()>>(); //~ ERROR E0277
85
| ^^^^^^^^^^^^^^^^^^^^^^^ within `Wrapper<'_, PhantomPinned>`, the trait `Unpin` is not implemented for `PhantomPinned`
96
|
7+
= note: consider using `Box::pin`
108
= note: required because it appears within the type `Wrapper<'_, PhantomPinned>`
11-
= note: required because of the requirements on the impl of `Unpin` for `Foo<(), ()>`
9+
note: required because of the requirements on the impl of `Unpin` for `Foo<(), ()>`
10+
--> tests/ui/not_unpin/assert-not-unpin.rs:8:15
11+
|
12+
8 | #[pin_project(!Unpin)]
13+
| ^^^^^^
14+
9 | struct Foo<T, U> {
15+
| ^^^^^^^^^
16+
note: required by a bound in `is_unpin`
17+
--> tests/ui/not_unpin/assert-not-unpin.rs:28:16
18+
|
19+
28 | fn is_unpin<T: Unpin>() {}
20+
| ^^^^^ required by this bound in `is_unpin`
1221

1322
error[E0277]: `PhantomPinned` cannot be unpinned
14-
--> $DIR/assert-not-unpin.rs:32:5
23+
--> tests/ui/not_unpin/assert-not-unpin.rs:32:5
1524
|
16-
28 | fn is_unpin<T: Unpin>() {}
17-
| ----- required by this bound in `is_unpin`
18-
...
1925
32 | is_unpin::<Foo<PhantomPinned, ()>>(); //~ ERROR E0277
2026
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ within `Wrapper<'_, PhantomPinned>`, the trait `Unpin` is not implemented for `PhantomPinned`
2127
|
28+
= note: consider using `Box::pin`
2229
= note: required because it appears within the type `Wrapper<'_, PhantomPinned>`
23-
= note: required because of the requirements on the impl of `Unpin` for `Foo<PhantomPinned, ()>`
30+
note: required because of the requirements on the impl of `Unpin` for `Foo<PhantomPinned, ()>`
31+
--> tests/ui/not_unpin/assert-not-unpin.rs:8:15
32+
|
33+
8 | #[pin_project(!Unpin)]
34+
| ^^^^^^
35+
9 | struct Foo<T, U> {
36+
| ^^^^^^^^^
37+
note: required by a bound in `is_unpin`
38+
--> tests/ui/not_unpin/assert-not-unpin.rs:28:16
39+
|
40+
28 | fn is_unpin<T: Unpin>() {}
41+
| ^^^^^ required by this bound in `is_unpin`
2442

2543
error[E0277]: `PhantomPinned` cannot be unpinned
26-
--> $DIR/assert-not-unpin.rs:33:5
44+
--> tests/ui/not_unpin/assert-not-unpin.rs:33:5
2745
|
28-
28 | fn is_unpin<T: Unpin>() {}
29-
| ----- required by this bound in `is_unpin`
30-
...
3146
33 | is_unpin::<Foo<(), PhantomPinned>>(); //~ ERROR E0277
3247
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ within `Wrapper<'_, PhantomPinned>`, the trait `Unpin` is not implemented for `PhantomPinned`
3348
|
49+
= note: consider using `Box::pin`
3450
= note: required because it appears within the type `Wrapper<'_, PhantomPinned>`
35-
= note: required because of the requirements on the impl of `Unpin` for `Foo<(), PhantomPinned>`
51+
note: required because of the requirements on the impl of `Unpin` for `Foo<(), PhantomPinned>`
52+
--> tests/ui/not_unpin/assert-not-unpin.rs:8:15
53+
|
54+
8 | #[pin_project(!Unpin)]
55+
| ^^^^^^
56+
9 | struct Foo<T, U> {
57+
| ^^^^^^^^^
58+
note: required by a bound in `is_unpin`
59+
--> tests/ui/not_unpin/assert-not-unpin.rs:28:16
60+
|
61+
28 | fn is_unpin<T: Unpin>() {}
62+
| ^^^^^ required by this bound in `is_unpin`
3663

3764
error[E0277]: `PhantomPinned` cannot be unpinned
38-
--> $DIR/assert-not-unpin.rs:34:5
65+
--> tests/ui/not_unpin/assert-not-unpin.rs:34:5
3966
|
40-
28 | fn is_unpin<T: Unpin>() {}
41-
| ----- required by this bound in `is_unpin`
42-
...
4367
34 | is_unpin::<Foo<PhantomPinned, PhantomPinned>>(); //~ ERROR E0277
4468
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ within `Wrapper<'_, PhantomPinned>`, the trait `Unpin` is not implemented for `PhantomPinned`
4569
|
70+
= note: consider using `Box::pin`
4671
= note: required because it appears within the type `Wrapper<'_, PhantomPinned>`
47-
= note: required because of the requirements on the impl of `Unpin` for `Foo<PhantomPinned, PhantomPinned>`
72+
note: required because of the requirements on the impl of `Unpin` for `Foo<PhantomPinned, PhantomPinned>`
73+
--> tests/ui/not_unpin/assert-not-unpin.rs:8:15
74+
|
75+
8 | #[pin_project(!Unpin)]
76+
| ^^^^^^
77+
9 | struct Foo<T, U> {
78+
| ^^^^^^^^^
79+
note: required by a bound in `is_unpin`
80+
--> tests/ui/not_unpin/assert-not-unpin.rs:28:16
81+
|
82+
28 | fn is_unpin<T: Unpin>() {}
83+
| ^^^^^ required by this bound in `is_unpin`
4884

4985
error[E0277]: `PhantomPinned` cannot be unpinned
50-
--> $DIR/assert-not-unpin.rs:36:5
86+
--> tests/ui/not_unpin/assert-not-unpin.rs:36:5
5187
|
52-
28 | fn is_unpin<T: Unpin>() {}
53-
| ----- required by this bound in `is_unpin`
54-
...
5588
36 | is_unpin::<TrivialBounds>(); //~ ERROR E0277
5689
| ^^^^^^^^^^^^^^^^^^^^^^^^^ within `Wrapper<'_, PhantomPinned>`, the trait `Unpin` is not implemented for `PhantomPinned`
5790
|
91+
= note: consider using `Box::pin`
5892
= note: required because it appears within the type `Wrapper<'_, PhantomPinned>`
59-
= note: required because of the requirements on the impl of `Unpin` for `TrivialBounds`
93+
note: required because of the requirements on the impl of `Unpin` for `TrivialBounds`
94+
--> tests/ui/not_unpin/assert-not-unpin.rs:15:15
95+
|
96+
15 | #[pin_project(!Unpin)]
97+
| ^^^^^^
98+
16 | struct TrivialBounds {
99+
| ^^^^^^^^^^^^^
100+
note: required by a bound in `is_unpin`
101+
--> tests/ui/not_unpin/assert-not-unpin.rs:28:16
102+
|
103+
28 | fn is_unpin<T: Unpin>() {}
104+
| ^^^^^ required by this bound in `is_unpin`
60105

61106
error[E0277]: `PhantomPinned` cannot be unpinned
62-
--> $DIR/assert-not-unpin.rs:38:5
107+
--> tests/ui/not_unpin/assert-not-unpin.rs:38:5
63108
|
64-
28 | fn is_unpin<T: Unpin>() {}
65-
| ----- required by this bound in `is_unpin`
66-
...
67109
38 | is_unpin::<Bar<'_, (), ()>>(); //~ ERROR E0277
68110
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ within `Wrapper<'_, PhantomPinned>`, the trait `Unpin` is not implemented for `PhantomPinned`
69111
|
112+
= note: consider using `Box::pin`
70113
= note: required because it appears within the type `Wrapper<'_, PhantomPinned>`
71-
= note: required because of the requirements on the impl of `Unpin` for `Bar<'_, (), ()>`
114+
note: required because of the requirements on the impl of `Unpin` for `Bar<'_, (), ()>`
115+
--> tests/ui/not_unpin/assert-not-unpin.rs:21:15
116+
|
117+
21 | #[pin_project(!Unpin)]
118+
| ^^^^^^
119+
22 | struct Bar<'a, T, U> {
120+
| ^^^^^^^^^^^^^
121+
note: required by a bound in `is_unpin`
122+
--> tests/ui/not_unpin/assert-not-unpin.rs:28:16
123+
|
124+
28 | fn is_unpin<T: Unpin>() {}
125+
| ^^^^^ required by this bound in `is_unpin`
72126

73127
error[E0277]: `PhantomPinned` cannot be unpinned
74-
--> $DIR/assert-not-unpin.rs:39:5
128+
--> tests/ui/not_unpin/assert-not-unpin.rs:39:5
75129
|
76-
28 | fn is_unpin<T: Unpin>() {}
77-
| ----- required by this bound in `is_unpin`
78-
...
79130
39 | is_unpin::<Bar<'_, PhantomPinned, PhantomPinned>>(); //~ ERROR E0277
80131
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ within `Wrapper<'_, PhantomPinned>`, the trait `Unpin` is not implemented for `PhantomPinned`
81132
|
133+
= note: consider using `Box::pin`
82134
= note: required because it appears within the type `Wrapper<'_, PhantomPinned>`
83-
= note: required because of the requirements on the impl of `Unpin` for `Bar<'_, PhantomPinned, PhantomPinned>`
135+
note: required because of the requirements on the impl of `Unpin` for `Bar<'_, PhantomPinned, PhantomPinned>`
136+
--> tests/ui/not_unpin/assert-not-unpin.rs:21:15
137+
|
138+
21 | #[pin_project(!Unpin)]
139+
| ^^^^^^
140+
22 | struct Bar<'a, T, U> {
141+
| ^^^^^^^^^^^^^
142+
note: required by a bound in `is_unpin`
143+
--> tests/ui/not_unpin/assert-not-unpin.rs:28:16
144+
|
145+
28 | fn is_unpin<T: Unpin>() {}
146+
| ^^^^^ required by this bound in `is_unpin`

0 commit comments

Comments
 (0)