aboutsummaryrefslogtreecommitdiff
path: root/tests/ui/pin_project/add-pinned-field.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/pin_project/add-pinned-field.stderr')
-rw-r--r--tests/ui/pin_project/add-pinned-field.stderr14
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/ui/pin_project/add-pinned-field.stderr b/tests/ui/pin_project/add-pinned-field.stderr
index a140694..a391f3b 100644
--- a/tests/ui/pin_project/add-pinned-field.stderr
+++ b/tests/ui/pin_project/add-pinned-field.stderr
@@ -7,7 +7,12 @@ error[E0277]: `PhantomPinned` cannot be unpinned
21 | is_unpin::<Foo>(); //~ ERROR E0277
| ^^^^^^^^^^^^^^^ within `__Foo<'_>`, the trait `Unpin` is not implemented for `PhantomPinned`
|
- = note: required because it appears within the type `__Foo<'_>`
+ = note: consider using `Box::pin`
+note: required because it appears within the type `__Foo<'_>`
+ --> $DIR/add-pinned-field.rs:8:8
+ |
+8 | struct Foo {
+ | ^^^
= note: required because of the requirements on the impl of `Unpin` for `Foo`
error[E0277]: `PhantomPinned` cannot be unpinned
@@ -19,5 +24,10 @@ error[E0277]: `PhantomPinned` cannot be unpinned
22 | is_unpin::<Bar>(); //~ ERROR E0277
| ^^^^^^^^^^^^^^^ within `__Bar<'_>`, the trait `Unpin` is not implemented for `PhantomPinned`
|
- = note: required because it appears within the type `__Bar<'_>`
+ = note: consider using `Box::pin`
+note: required because it appears within the type `__Bar<'_>`
+ --> $DIR/add-pinned-field.rs:15:8
+ |
+15 | struct Bar {
+ | ^^^
= note: required because of the requirements on the impl of `Unpin` for `Bar`