about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-10-14 17:06:35 +0200
committerGitHub <noreply@github.com>2024-10-14 17:06:35 +0200
commit7ed6d1cd380bc505f4988bf7eef7c5777ab86cfc (patch)
treedefe3a51cc90ecf129bce3cc4df0570801a6a1b7
parent17a19e684cdf3ca088af8b4da6a6209d128913f4 (diff)
parent5db54bee68a0328cb49cef690be53c15d56cb857 (diff)
downloadrust-7ed6d1cd380bc505f4988bf7eef7c5777ab86cfc.tar.gz
rust-7ed6d1cd380bc505f4988bf7eef7c5777ab86cfc.zip
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``
-rw-r--r--library/core/src/pin.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/core/src/pin.rs b/library/core/src/pin.rs
index 9c13662e08e..fac789dbd99 100644
--- a/library/core/src/pin.rs
+++ b/library/core/src/pin.rs
@@ -1422,7 +1422,7 @@ impl<Ptr: DerefMut> Pin<Ptr> {
     /// 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
     /// `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"]
     #[inline(always)]
     pub fn as_deref_mut(self: Pin<&mut Pin<Ptr>>) -> Pin<&mut Ptr::Target> {