Rollup merge of #129424 - coolreader18:stabilize-pin_as_deref_mut, r=dtolnay
Stabilize `Pin::as_deref_mut()` Tracking issue: closes #86918 Stabilizing the following API: ```rust impl<Ptr: DerefMut> Pin<Ptr> { pub fn as_deref_mut(self: Pin<&mut Pin<Ptr>>) -> Pin<&mut Ptr::Target>; } ``` 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``
This commit is contained in:
commit
7ed6d1cd38
1 changed files with 1 additions and 1 deletions
|
@ -1422,7 +1422,7 @@ impl<Ptr: DerefMut> Pin<Ptr> {
|
||||||
/// move in the future, and this method does not enable the pointee to move. "Malicious"
|
/// move in the future, and this method does not enable the pointee to move. "Malicious"
|
||||||
/// implementations of `Ptr::DerefMut` are likewise ruled out by the contract of
|
/// implementations of `Ptr::DerefMut` are likewise ruled out by the contract of
|
||||||
/// `Pin::new_unchecked`.
|
/// `Pin::new_unchecked`.
|
||||||
#[unstable(feature = "pin_deref_mut", issue = "86918")]
|
#[stable(feature = "pin_deref_mut", since = "CURRENT_RUSTC_VERSION")]
|
||||||
#[must_use = "`self` will be dropped if the result is not used"]
|
#[must_use = "`self` will be dropped if the result is not used"]
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
pub fn as_deref_mut(self: Pin<&mut Pin<Ptr>>) -> Pin<&mut Ptr::Target> {
|
pub fn as_deref_mut(self: Pin<&mut Pin<Ptr>>) -> Pin<&mut Ptr::Target> {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue