You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
111: Add a dummy lifetime to UnpinStruct r=taiki-e a=taiki-e
Basically the same as #107.
This fixes#102 completely.
cc #108
Co-authored-by: Taiki Endo <te316e89@gmail.com>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ within `UnpinStructBar<std::marker::PhantomPinned>`, the trait `std::marker::Unpin` is not implemented for `std::marker::PhantomPinned`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ within `UnpinStructBar<'_, std::marker::PhantomPinned>`, the trait `std::marker::Unpin` is not implemented for `std::marker::PhantomPinned`
9
9
|
10
10
= help: the following implementations were found:
11
11
<std::marker::PhantomPinned as std::marker::Unpin>
12
-
= note: required because it appears within the type `UnpinStructBar<std::marker::PhantomPinned>`
12
+
= note: required because it appears within the type `UnpinStructBar<'_, std::marker::PhantomPinned>`
13
13
= note: required because of the requirements on the impl of `std::marker::Unpin` for `Bar<std::marker::PhantomPinned>`
error[E0277]: the trait bound `T: std::marker::Unpin` is not satisfied in `UnpinStructFoo<T, U>`
2
-
--> $DIR/proper_unpin.rs:20:5
1
+
error[E0277]: the trait bound `std::marker::PhantomPinned: std::marker::Unpin` is not satisfied in `UnpinStructFoo<'_, std::marker::PhantomPinned, ()>`
2
+
--> $DIR/proper_unpin.rs:33:5
3
3
|
4
-
17 | fn is_unpin<T: Unpin>() {}
4
+
30 | fn is_unpin<T: Unpin>() {}
5
5
| -------- ----- required by this bound in `is_unpin`
6
6
...
7
-
20 | is_unpin::<Foo<T, U>>(); //~ ERROR E0277
8
-
| ^^^^^^^^^^^^^^^^^^^^^ within `UnpinStructFoo<T, U>`, the trait `std::marker::Unpin` is not implemented for `T`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ within `UnpinStructFoo<'_, std::marker::PhantomPinned, ()>`, the trait `std::marker::Unpin` is not implemented for `std::marker::PhantomPinned`
9
9
|
10
-
= help: consider adding a `where T: std::marker::Unpin` bound
11
-
= note: required because it appears within the type `Inner<T>`
12
-
= note: required because it appears within the type `UnpinStructFoo<T, U>`
13
-
= note: required because of the requirements on the impl of `std::marker::Unpin` for `Foo<T, U>`
10
+
= help: the following implementations were found:
11
+
<std::marker::PhantomPinned as std::marker::Unpin>
12
+
= note: required because it appears within the type `Inner<std::marker::PhantomPinned>`
13
+
= note: required because it appears within the type `UnpinStructFoo<'_, std::marker::PhantomPinned, ()>`
14
+
= note: required because of the requirements on the impl of `std::marker::Unpin` for `Foo<std::marker::PhantomPinned, ()>`
14
15
15
-
error: aborting due to previous error
16
+
error[E0277]: the trait bound `std::marker::PhantomPinned: std::marker::Unpin` is not satisfied in `UnpinStructFoo<'_, std::marker::PhantomPinned, std::marker::PhantomPinned>`
17
+
--> $DIR/proper_unpin.rs:35:5
18
+
|
19
+
30 | fn is_unpin<T: Unpin>() {}
20
+
| -------- ----- required by this bound in `is_unpin`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ within `UnpinStructFoo<'_, std::marker::PhantomPinned, std::marker::PhantomPinned>`, the trait `std::marker::Unpin` is not implemented for `std::marker::PhantomPinned`
24
+
|
25
+
= help: the following implementations were found:
26
+
<std::marker::PhantomPinned as std::marker::Unpin>
27
+
= note: required because it appears within the type `Inner<std::marker::PhantomPinned>`
28
+
= note: required because it appears within the type `UnpinStructFoo<'_, std::marker::PhantomPinned, std::marker::PhantomPinned>`
29
+
= note: required because of the requirements on the impl of `std::marker::Unpin` for `Foo<std::marker::PhantomPinned, std::marker::PhantomPinned>`
30
+
31
+
error[E0277]: the trait bound `std::marker::PhantomPinned: std::marker::Unpin` is not satisfied in `UnpinStructTrivialBounds<'_>`
32
+
--> $DIR/proper_unpin.rs:37:5
33
+
|
34
+
30 | fn is_unpin<T: Unpin>() {}
35
+
| -------- ----- required by this bound in `is_unpin`
36
+
...
37
+
37 | is_unpin::<TrivialBounds>(); //~ ERROR E0277
38
+
| ^^^^^^^^^^^^^^^^^^^^^^^^^ within `UnpinStructTrivialBounds<'_>`, the trait `std::marker::Unpin` is not implemented for `std::marker::PhantomPinned`
39
+
|
40
+
= help: the following implementations were found:
41
+
<std::marker::PhantomPinned as std::marker::Unpin>
42
+
= note: required because it appears within the type `UnpinStructTrivialBounds<'_>`
43
+
= note: required because of the requirements on the impl of `std::marker::Unpin` for `TrivialBounds`
44
+
45
+
error: aborting due to 3 previous errors
16
46
17
47
For more information about this error, try `rustc --explain E0277`.
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `pin_project::UnsafeUnpin` is not implemented for `NotImplementUnsafUnpin`
39
39
|
40
40
= note: required because of the requirements on the impl of `pin_project::UnsafeUnpin` for `pin_project::__private::Wrapper<'_, NotImplementUnsafUnpin>`
41
41
= note: required because of the requirements on the impl of `std::marker::Unpin` for `NotImplementUnsafUnpin`
42
42
43
43
error[E0277]: the trait bound `std::marker::PhantomPinned: std::marker::Unpin` is not satisfied
44
-
--> $DIR/proper_unpin.rs:40:5
44
+
--> $DIR/proper_unpin.rs:43:5
45
45
|
46
46
6 | fn is_unpin<T: Unpin>() {}
47
47
| -------- ----- required by this bound in `is_unpin`
0 commit comments