rust icon indicating copy to clipboard operation
rust copied to clipboard

Stabilize `Pin::as_deref_mut()`

Open coolreader18 opened this issue 1 year ago • 3 comments

Tracking issue: #86918

Stabilizing the following API:

impl<Ptr: Deref> Pin<Ptr> {
    pub fn as_deref_mut(self: Pin<&mut Pin<Ptr>>) -> Pin<&mut Ptr::Target>
    where
        Ptr: DerefMut;
}

(the double Deref / DerefMut bound is because as_deref_mut is in the same impl block as as_ref(), for docs consistency reasons.)

I know that an FCP has not been started yet, but this isn't a very complex stabilization, and I'm hoping this can motivate an FCP to get started - this has been pending for a while and it's a very useful function when writing Future impls.

r? @jonhoo

coolreader18 avatar Aug 22 '24 19:08 coolreader18

Failed to set assignee to jonhoo: invalid assignee

Note: Only org members with at least the repository "read" role, users with write permissions, or people who have commented on the PR may be assigned.

rustbot avatar Aug 22 '24 19:08 rustbot

r? @dtolnay

coolreader18 avatar Aug 22 '24 19:08 coolreader18

Makes sense. I'll close this for now, and reopen once the signature has been resolved.

coolreader18 avatar Aug 23 '24 05:08 coolreader18

ping @dtolnay? FCP merged in https://github.com/rust-lang/rust/issues/86918#issuecomment-2393899312

coolreader18 avatar Oct 08 '24 19:10 coolreader18

@bors r+

dtolnay avatar Oct 08 '24 21:10 dtolnay

:pushpin: Commit 5db54bee68a0328cb49cef690be53c15d56cb857 has been approved by dtolnay

It is now in the queue for this repository.

bors avatar Oct 08 '24 21:10 bors

:hourglass: Testing commit 5db54bee68a0328cb49cef690be53c15d56cb857 with merge 8a116954710980c1a86d92d8120e71c55c0622ca...

bors avatar Oct 09 '24 10:10 bors

The job x86_64-gnu-llvm-18 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
##[group]Building stage1 library artifacts (x86_64-unknown-linux-gnu)
##[endgroup]
##[group]Building tool rustdoc (stage0 -> stage1, x86_64-unknown-linux-gnu)
##[endgroup]
thread 'core::builder::tests::ci_rustc_if_unchanged_logic' panicked at src/core/builder/tests.rs:260:5:
assertion failed: has_changes == config.download_rustc_commit.is_none()
   0: rust_begin_unwind
             at /rustc/8c27a2ba6b21f3406a51118643080f0591949827/library/std/src/panicking.rs:662:5
   1: core::panicking::panic_fmt
             at /rustc/8c27a2ba6b21f3406a51118643080f0591949827/library/core/src/panicking.rs:74:14

rust-log-analyzer avatar Oct 09 '24 11:10 rust-log-analyzer

:broken_heart: Test failed - checks-actions

bors avatar Oct 09 '24 11:10 bors

@bors retry

dtolnay avatar Oct 09 '24 11:10 dtolnay

:hourglass: Testing commit 5db54bee68a0328cb49cef690be53c15d56cb857 with merge 0031040f3312a2765dd9dbec763664ef27220747...

bors avatar Oct 09 '24 12:10 bors

:broken_heart: Test failed - checks-actions

bors avatar Oct 09 '24 12:10 bors

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

rust-log-analyzer avatar Oct 09 '24 12:10 rust-log-analyzer

@bors retry

coolreader18 avatar Oct 13 '24 05:10 coolreader18

@coolreader18: :key: Insufficient privileges: not in try users

bors avatar Oct 13 '24 05:10 bors

fair enough

coolreader18 avatar Oct 13 '24 05:10 coolreader18

@bors retry

dtolnay avatar Oct 14 '24 07:10 dtolnay