aboutsummaryrefslogtreecommitdiff
path: root/tests/ui/pinned_drop
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/pinned_drop')
-rw-r--r--tests/ui/pinned_drop/call-drop-inner.stderr2
-rw-r--r--tests/ui/pinned_drop/conditional-drop-impl.stderr32
-rw-r--r--tests/ui/pinned_drop/forget-pinned-drop-impl.stderr16
-rw-r--r--tests/ui/pinned_drop/self.stderr4
4 files changed, 31 insertions, 23 deletions
diff --git a/tests/ui/pinned_drop/call-drop-inner.stderr b/tests/ui/pinned_drop/call-drop-inner.stderr
index 463e837..8fbe2dc 100644
--- a/tests/ui/pinned_drop/call-drop-inner.stderr
+++ b/tests/ui/pinned_drop/call-drop-inner.stderr
@@ -11,4 +11,4 @@ note: function defined here
|
10 | #[pinned_drop]
| ^^^^^^^^^^^^^^
- = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
+ = note: this error originates in the attribute macro `pinned_drop` (in Nightly builds, run with -Z macro-backtrace for more info)
diff --git a/tests/ui/pinned_drop/conditional-drop-impl.stderr b/tests/ui/pinned_drop/conditional-drop-impl.stderr
index 8ab2294..a512578 100644
--- a/tests/ui/pinned_drop/conditional-drop-impl.stderr
+++ b/tests/ui/pinned_drop/conditional-drop-impl.stderr
@@ -13,19 +13,23 @@ note: the implementor must specify the same requirement
| |_^
error[E0277]: `T` cannot be unpinned
- --> $DIR/conditional-drop-impl.rs:16:15
- |
-16 | #[pin_project(PinnedDrop)] //~ ERROR E0277
- | ^^^^^^^^^^ the trait `Unpin` is not implemented for `T`
- |
- = note: consider using `Box::pin`
+ --> $DIR/conditional-drop-impl.rs:16:15
+ |
+16 | #[pin_project(PinnedDrop)] //~ ERROR E0277
+ | ^^^^^^^^^^ the trait `Unpin` is not implemented for `T`
+ |
+ = note: consider using `Box::pin`
note: required because of the requirements on the impl of `PinnedDrop` for `PinnedDropImpl<T>`
- --> $DIR/conditional-drop-impl.rs:23:16
- |
-23 | impl<T: Unpin> PinnedDrop for PinnedDropImpl<T> {
- | ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^
- = note: required by `pin_project::__private::PinnedDrop::drop`
+ --> $DIR/conditional-drop-impl.rs:23:16
+ |
+23 | impl<T: Unpin> PinnedDrop for PinnedDropImpl<T> {
+ | ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^
+note: required by `pin_project::__private::PinnedDrop::drop`
+ --> $DIR/lib.rs:186:9
+ |
+186 | unsafe fn drop(self: Pin<&mut Self>);
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: consider restricting type parameter `T`
- |
-17 | struct PinnedDropImpl<T: std::marker::Unpin> {
- | ^^^^^^^^^^^^^^^^^^^^
+ |
+17 | struct PinnedDropImpl<T: std::marker::Unpin> {
+ | ^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/pinned_drop/forget-pinned-drop-impl.stderr b/tests/ui/pinned_drop/forget-pinned-drop-impl.stderr
index 9fd7cdb..d218545 100644
--- a/tests/ui/pinned_drop/forget-pinned-drop-impl.stderr
+++ b/tests/ui/pinned_drop/forget-pinned-drop-impl.stderr
@@ -1,7 +1,11 @@
error[E0277]: the trait bound `Struct: PinnedDrop` is not satisfied
- --> $DIR/forget-pinned-drop-impl.rs:3:15
- |
-3 | #[pin_project(PinnedDrop)] //~ ERROR E0277
- | ^^^^^^^^^^ the trait `PinnedDrop` is not implemented for `Struct`
- |
- = note: required by `pin_project::__private::PinnedDrop::drop`
+ --> $DIR/forget-pinned-drop-impl.rs:3:15
+ |
+3 | #[pin_project(PinnedDrop)] //~ ERROR E0277
+ | ^^^^^^^^^^ the trait `PinnedDrop` is not implemented for `Struct`
+ |
+note: required by `pin_project::__private::PinnedDrop::drop`
+ --> $DIR/lib.rs:186:9
+ |
+186 | unsafe fn drop(self: Pin<&mut Self>);
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/pinned_drop/self.stderr b/tests/ui/pinned_drop/self.stderr
index 4ccbc41..7de286f 100644
--- a/tests/ui/pinned_drop/self.stderr
+++ b/tests/ui/pinned_drop/self.stderr
@@ -8,7 +8,7 @@ error: `self` parameter is only allowed in associated functions
| ----- in this macro invocation
|
= note: associated functions are those in `impl` or `trait` definitions
- = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
+ = note: this error originates in the macro `t` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0434]: can't capture dynamic environment in a fn item
--> $DIR/self.rs:16:29
@@ -20,7 +20,7 @@ error[E0434]: can't capture dynamic environment in a fn item
| ----- in this macro invocation
|
= help: use the `|| { ... }` closure form instead
- = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
+ = note: this error originates in the macro `t` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0423]: expected value, found struct `S`
--> $DIR/self.rs:40:27