Files
rust/library
bors e8f92f5769 Auto merge of #144537 - frank-king:feature/pin-drop, r=petrochenkov
Add `Drop::pin_drop` for pinned drops





This PR is part of the `pin_ergonomics` experiment (the tracking issue is rust-lang/rust#130494). It allows implementing `Drop` with a pinned `self` receiver, which is required for safe pin-projection.

Implementations:
- [x] At least and at most one of `drop` and `pin_drop` should be implemented.
- [x] No direct call of `drop` or `pin_drop`. They should only be called by the drop glue.
- [x] `pin_drop` must and must only be used with types that support pin-projection (i.e. types with `#[pin_v2]`).
- [ ] Allows writing `fn drop(&pin mut self)` and desugars to `fn pin_drop(&pin mut self)`. (Will be in the next PRs)
2026-05-10 16:43:01 +00:00
..
2026-01-26 10:57:35 +00:00