diff options
Diffstat (limited to 'tests/ui/pinned_drop')
-rw-r--r-- | tests/ui/pinned_drop/call-drop-inner.stderr | 9 | ||||
-rw-r--r-- | tests/ui/pinned_drop/conditional-drop-impl.stderr | 9 | ||||
-rw-r--r-- | tests/ui/pinned_drop/invalid.rs | 2 | ||||
-rw-r--r-- | tests/ui/pinned_drop/invalid.stderr | 4 | ||||
-rw-r--r-- | tests/ui/pinned_drop/pinned-drop-no-attr-arg.stderr | 2 | ||||
-rw-r--r-- | tests/ui/pinned_drop/self.stderr | 8 | ||||
-rw-r--r-- | tests/ui/pinned_drop/unsafe-call.stderr | 3 |
7 files changed, 21 insertions, 16 deletions
diff --git a/tests/ui/pinned_drop/call-drop-inner.stderr b/tests/ui/pinned_drop/call-drop-inner.stderr index e3ceebd..277d50f 100644 --- a/tests/ui/pinned_drop/call-drop-inner.stderr +++ b/tests/ui/pinned_drop/call-drop-inner.stderr @@ -2,7 +2,10 @@ error[E0061]: this function takes 0 arguments but 1 argument was supplied --> tests/ui/pinned_drop/call-drop-inner.rs:13:9 | 13 | __drop_inner(__self); - | ^^^^^^^^^^^^ ------ argument of type `Pin<&mut Struct>` unexpected + | ^^^^^^^^^^^^ ------ + | | + | unexpected argument of type `Pin<&mut Struct>` + | help: remove the extra argument | note: function defined here --> tests/ui/pinned_drop/call-drop-inner.rs:10:1 @@ -10,7 +13,3 @@ note: function defined here 10 | #[pinned_drop] | ^^^^^^^^^^^^^^ = note: this error originates in the attribute macro `pinned_drop` (in Nightly builds, run with -Z macro-backtrace for more info) -help: remove the extra argument - | -13 | __drop_inner(); - | ~~~~~~~~~~~~~~ diff --git a/tests/ui/pinned_drop/conditional-drop-impl.stderr b/tests/ui/pinned_drop/conditional-drop-impl.stderr index 0587765..837b1db 100644 --- a/tests/ui/pinned_drop/conditional-drop-impl.stderr +++ b/tests/ui/pinned_drop/conditional-drop-impl.stderr @@ -16,12 +16,15 @@ error[E0277]: `T` cannot be unpinned 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>` + = note: consider using the `pin!` macro + consider using `Box::pin` if you need to access the pinned value outside of the current scope +note: required for `PinnedDropImpl<T>` to implement `PinnedDrop` --> tests/ui/pinned_drop/conditional-drop-impl.rs:23:16 | 23 | impl<T: Unpin> PinnedDrop for PinnedDropImpl<T> { - | ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ + | ----- ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ + | | + | unsatisfied trait bound introduced here help: consider restricting type parameter `T` | 17 | struct PinnedDropImpl<T: std::marker::Unpin> { diff --git a/tests/ui/pinned_drop/invalid.rs b/tests/ui/pinned_drop/invalid.rs index fdadf8a..b2c2526 100644 --- a/tests/ui/pinned_drop/invalid.rs +++ b/tests/ui/pinned_drop/invalid.rs @@ -6,7 +6,7 @@ mod argument { #[pin_project(PinnedDrop)] struct UnexpectedArg1(()); - #[pinned_drop(foo)] //~ ERROR unexpected token + #[pinned_drop(foo)] //~ ERROR unexpected argument impl PinnedDrop for UnexpectedArg1 { fn drop(self: Pin<&mut Self>) {} } diff --git a/tests/ui/pinned_drop/invalid.stderr b/tests/ui/pinned_drop/invalid.stderr index d509964..264def0 100644 --- a/tests/ui/pinned_drop/invalid.stderr +++ b/tests/ui/pinned_drop/invalid.stderr @@ -1,7 +1,7 @@ -error: unexpected token: `foo` +error: unexpected argument: `foo` --> tests/ui/pinned_drop/invalid.rs:9:19 | -9 | #[pinned_drop(foo)] //~ ERROR unexpected token +9 | #[pinned_drop(foo)] //~ ERROR unexpected argument | ^^^ error: duplicate #[pinned_drop] attribute diff --git a/tests/ui/pinned_drop/pinned-drop-no-attr-arg.stderr b/tests/ui/pinned_drop/pinned-drop-no-attr-arg.stderr index 2542254..a07ba99 100644 --- a/tests/ui/pinned_drop/pinned-drop-no-attr-arg.stderr +++ b/tests/ui/pinned_drop/pinned-drop-no-attr-arg.stderr @@ -1,4 +1,4 @@ -error[E0119]: conflicting implementations of trait `_::_pin_project::__private::PinnedDrop` for type `S` +error[E0119]: conflicting implementations of trait `PinnedDrop` for type `S` --> tests/ui/pinned_drop/pinned-drop-no-attr-arg.rs:12:1 | 5 | #[pin_project] diff --git a/tests/ui/pinned_drop/self.stderr b/tests/ui/pinned_drop/self.stderr index a19d5a0..ad506a5 100644 --- a/tests/ui/pinned_drop/self.stderr +++ b/tests/ui/pinned_drop/self.stderr @@ -37,7 +37,7 @@ error[E0308]: mismatched types --> tests/ui/pinned_drop/self.rs:39:25 | 39 | let _: () = self; //~ ERROR E0308 - | -- ^^^^ expected `()`, found struct `Pin` + | -- ^^^^ expected `()`, found `Pin<&mut S>` | | | expected due to this | @@ -48,15 +48,15 @@ error[E0308]: mismatched types --> tests/ui/pinned_drop/self.rs:52:25 | 52 | let _: () = self; //~ ERROR E0308 - | -- ^^^^ expected `()`, found struct `Pin` + | -- ^^^^ expected `()`, found `Pin<&mut E>` | | | expected due to this | = note: expected unit type `()` found struct `Pin<&mut E>` -error[E0533]: expected unit struct, unit variant or constant, found struct variant `E::V` +error[E0533]: expected value, found struct variant `E::V` --> tests/ui/pinned_drop/self.rs:53:27 | 53 | let _: Self = Self::V; //~ ERROR E0533 - | ^^^^^^^ + | ^^^^^^^ not a value diff --git a/tests/ui/pinned_drop/unsafe-call.stderr b/tests/ui/pinned_drop/unsafe-call.stderr index 9f7dd44..911a58e 100644 --- a/tests/ui/pinned_drop/unsafe-call.stderr +++ b/tests/ui/pinned_drop/unsafe-call.stderr @@ -1,6 +1,9 @@ error[E0133]: call to unsafe function is unsafe and requires unsafe function or block --> tests/ui/pinned_drop/unsafe-call.rs:14:9 | +11 | #[pinned_drop] + | -------------- items do not inherit unsafety from separate enclosing items +... 14 | self.project().f.get_unchecked_mut(); //~ ERROR call to unsafe function is unsafe and requires unsafe function or block [E0133] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function | |