Skip to content

Commit

Permalink
tests: ui: compile-fail: pinned_drop: wrong_receiver: fix nightly output
Browse files Browse the repository at this point in the history
  • Loading branch information
y86-dev committed Jul 7, 2024
1 parent 3345d0f commit 1f776c0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/ui/compile-fail/pinned_drop/wrong_receiver.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ error[E0053]: method `drop` has an incompatible type for trait
--> tests/ui/compile-fail/pinned_drop/wrong_receiver.rs:8:13
|
8 | fn drop(&mut self) {}
| ^^^^^^^^^
| |
| expected `Pin<&mut Foo>`, found `&mut Foo`
| help: change the self-receiver type to match the trait: `self: Pin<&mut Foo>`
| ^^^^^^^^^ expected `Pin<&mut Foo>`, found `&mut Foo`
|
= note: expected signature `fn(Pin<&mut Foo>, OnlyCallFromDrop)`
found signature `fn(&mut Foo, OnlyCallFromDrop)`
help: change the self-receiver type to match the trait
|
8 | fn drop(self: Pin<&mut Foo>) {}
| ~~~~~~~~~~~~~~~~~~~

0 comments on commit 1f776c0

Please sign in to comment.