Skip to content

Commit 0b3061a

Browse files
Stabilize ::{core,std}::pin::pin!
1 parent 4596f4f commit 0b3061a

File tree

7 files changed

+5
-13
lines changed

7 files changed

+5
-13
lines changed

library/core/src/pin.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -939,7 +939,6 @@ impl<P, U> DispatchFromDyn<Pin<U>> for Pin<P> where P: DispatchFromDyn<U> {}
939939
/// ### Basic usage
940940
///
941941
/// ```rust
942-
/// #![feature(pin_macro)]
943942
/// # use core::marker::PhantomPinned as Foo;
944943
/// use core::pin::{pin, Pin};
945944
///
@@ -957,7 +956,6 @@ impl<P, U> DispatchFromDyn<Pin<U>> for Pin<P> where P: DispatchFromDyn<U> {}
957956
/// ### Manually polling a `Future` (without `Unpin` bounds)
958957
///
959958
/// ```rust
960-
/// #![feature(pin_macro)]
961959
/// use std::{
962960
/// future::Future,
963961
/// pin::pin,
@@ -996,7 +994,7 @@ impl<P, U> DispatchFromDyn<Pin<U>> for Pin<P> where P: DispatchFromDyn<U> {}
996994
/// ### With `Generator`s
997995
///
998996
/// ```rust
999-
/// #![feature(generators, generator_trait, pin_macro)]
997+
/// #![feature(generators, generator_trait)]
1000998
/// use core::{
1001999
/// ops::{Generator, GeneratorState},
10021000
/// pin::pin,
@@ -1039,7 +1037,6 @@ impl<P, U> DispatchFromDyn<Pin<U>> for Pin<P> where P: DispatchFromDyn<U> {}
10391037
/// The following, for instance, fails to compile:
10401038
///
10411039
/// ```rust,compile_fail
1042-
/// #![feature(pin_macro)]
10431040
/// use core::pin::{pin, Pin};
10441041
/// # use core::{marker::PhantomPinned as Foo, mem::drop as stuff};
10451042
///
@@ -1081,7 +1078,7 @@ impl<P, U> DispatchFromDyn<Pin<U>> for Pin<P> where P: DispatchFromDyn<U> {}
10811078
/// constructor.
10821079
///
10831080
/// [`Box::pin`]: ../../std/boxed/struct.Box.html#method.pin
1084-
#[unstable(feature = "pin_macro", issue = "93178")]
1081+
#[stable(feature = "pin_macro", since = "CURRENT_RUSTC_VERSION")]
10851082
#[rustc_macro_transparency = "semitransparent"]
10861083
#[allow_internal_unstable(unsafe_pin_internals)]
10871084
pub macro pin($value:expr $(,)?) {

library/core/tests/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
#![feature(inline_const)]
4444
#![feature(is_sorted)]
4545
#![feature(pattern)]
46-
#![feature(pin_macro)]
4746
#![feature(sort_internals)]
4847
#![feature(slice_take)]
4948
#![feature(slice_from_ptr_range)]

src/test/ui/pin-macro/cant_access_internals.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// edition:2018
2-
#![feature(pin_macro)]
32

43
use core::{
54
marker::PhantomPinned,

src/test/ui/pin-macro/cant_access_internals.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0658]: use of unstable library feature 'unsafe_pin_internals'
2-
--> $DIR/cant_access_internals.rs:12:15
2+
--> $DIR/cant_access_internals.rs:11:15
33
|
44
LL | mem::take(phantom_pinned.pointer);
55
| ^^^^^^^^^^^^^^^^^^^^^^

src/test/ui/pin-macro/lifetime_errors_on_promotion_misusage.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// edition:2018
2-
#![feature(pin_macro)]
32

43
use core::{
54
convert::identity,

src/test/ui/pin-macro/lifetime_errors_on_promotion_misusage.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0716]: temporary value dropped while borrowed
2-
--> $DIR/lifetime_errors_on_promotion_misusage.rs:12:35
2+
--> $DIR/lifetime_errors_on_promotion_misusage.rs:11:35
33
|
44
LL | let phantom_pinned = identity(pin!(PhantomPinned));
55
| ^^^^^^^^^^^^^^^^^^^ - temporary value is freed at the end of this statement
@@ -13,7 +13,7 @@ LL | stuff(phantom_pinned)
1313
= note: this error originates in the macro `pin` (in Nightly builds, run with -Z macro-backtrace for more info)
1414

1515
error[E0716]: temporary value dropped while borrowed
16-
--> $DIR/lifetime_errors_on_promotion_misusage.rs:19:30
16+
--> $DIR/lifetime_errors_on_promotion_misusage.rs:18:30
1717
|
1818
LL | let phantom_pinned = {
1919
| -------------- borrow later stored here

src/tools/miri/tests/pass/issues/issue-miri-2068.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![feature(pin_macro)]
2-
31
use core::future::Future;
42
use core::pin::Pin;
53
use core::task::{Context, Poll};

0 commit comments

Comments
 (0)