Skip to content

Commit d67cc19

Browse files
danielhenrymantilladtolnay
authored andcommitted
Stabilize ::{core,std}::pin::pin!
1 parent 0251d8b commit d67cc19

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

core/src/pin.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -622,9 +622,8 @@ impl<P: Deref> Pin<P> {
622622
/// that the closure is pinned.
623623
///
624624
/// The better alternative is to avoid all that trouble and do the pinning in the outer function
625-
/// instead (here using the unstable `pin` macro):
625+
/// instead (here using the [`pin!`][crate::pin::pin] macro):
626626
/// ```
627-
/// #![feature(pin_macro)]
628627
/// use std::pin::pin;
629628
/// use std::task::Context;
630629
/// use std::future::Future;
@@ -1026,7 +1025,6 @@ impl<P, U> DispatchFromDyn<Pin<U>> for Pin<P> where P: DispatchFromDyn<U> {}
10261025
/// ### Basic usage
10271026
///
10281027
/// ```rust
1029-
/// #![feature(pin_macro)]
10301028
/// # use core::marker::PhantomPinned as Foo;
10311029
/// use core::pin::{pin, Pin};
10321030
///
@@ -1044,7 +1042,6 @@ impl<P, U> DispatchFromDyn<Pin<U>> for Pin<P> where P: DispatchFromDyn<U> {}
10441042
/// ### Manually polling a `Future` (without `Unpin` bounds)
10451043
///
10461044
/// ```rust
1047-
/// #![feature(pin_macro)]
10481045
/// use std::{
10491046
/// future::Future,
10501047
/// pin::pin,
@@ -1083,7 +1080,7 @@ impl<P, U> DispatchFromDyn<Pin<U>> for Pin<P> where P: DispatchFromDyn<U> {}
10831080
/// ### With `Generator`s
10841081
///
10851082
/// ```rust
1086-
/// #![feature(generators, generator_trait, pin_macro)]
1083+
/// #![feature(generators, generator_trait)]
10871084
/// use core::{
10881085
/// ops::{Generator, GeneratorState},
10891086
/// pin::pin,
@@ -1126,7 +1123,6 @@ impl<P, U> DispatchFromDyn<Pin<U>> for Pin<P> where P: DispatchFromDyn<U> {}
11261123
/// The following, for instance, fails to compile:
11271124
///
11281125
/// ```rust,compile_fail
1129-
/// #![feature(pin_macro)]
11301126
/// use core::pin::{pin, Pin};
11311127
/// # use core::{marker::PhantomPinned as Foo, mem::drop as stuff};
11321128
///
@@ -1168,7 +1164,7 @@ impl<P, U> DispatchFromDyn<Pin<U>> for Pin<P> where P: DispatchFromDyn<U> {}
11681164
/// constructor.
11691165
///
11701166
/// [`Box::pin`]: ../../std/boxed/struct.Box.html#method.pin
1171-
#[unstable(feature = "pin_macro", issue = "93178")]
1167+
#[stable(feature = "pin_macro", since = "CURRENT_RUSTC_VERSION")]
11721168
#[rustc_macro_transparency = "semitransparent"]
11731169
#[allow_internal_unstable(unsafe_pin_internals)]
11741170
pub macro pin($value:expr $(,)?) {

core/tests/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
#![feature(is_sorted)]
4949
#![feature(layout_for_ptr)]
5050
#![feature(pattern)]
51-
#![feature(pin_macro)]
5251
#![feature(sort_internals)]
5352
#![feature(slice_take)]
5453
#![feature(slice_from_ptr_range)]

0 commit comments

Comments
 (0)