@@ -578,8 +578,6 @@ impl<T: ?Sized> Arc<T> {
578
578
/// # Examples
579
579
///
580
580
/// ```
581
- /// #![feature(weak_into_raw)]
582
- ///
583
581
/// use std::sync::Arc;
584
582
///
585
583
/// let x = Arc::new("hello".to_owned());
@@ -588,7 +586,7 @@ impl<T: ?Sized> Arc<T> {
588
586
/// assert_eq!(x_ptr, Arc::as_ptr(&y));
589
587
/// assert_eq!(unsafe { &*x_ptr }, "hello");
590
588
/// ```
591
- #[ unstable ( feature = "weak_into_raw" , issue = "60728 " ) ]
589
+ #[ stable ( feature = "weak_into_raw" , since = "1.45.0 " ) ]
592
590
pub fn as_ptr ( this : & Self ) -> * const T {
593
591
let ptr: * mut ArcInner < T > = NonNull :: as_ptr ( this. ptr ) ;
594
592
let fake_ptr = ptr as * mut T ;
@@ -1446,8 +1444,6 @@ impl<T> Weak<T> {
1446
1444
/// # Examples
1447
1445
///
1448
1446
/// ```
1449
- /// #![feature(weak_into_raw)]
1450
- ///
1451
1447
/// use std::sync::Arc;
1452
1448
/// use std::ptr;
1453
1449
///
@@ -1465,7 +1461,7 @@ impl<T> Weak<T> {
1465
1461
/// ```
1466
1462
///
1467
1463
/// [`null`]: ../../std/ptr/fn.null.html
1468
- #[ unstable ( feature = "weak_into_raw" , issue = "60728 " ) ]
1464
+ #[ stable ( feature = "weak_into_raw" , since = "1.45.0 " ) ]
1469
1465
pub fn as_ptr ( & self ) -> * const T {
1470
1466
let offset = data_offset_sized :: < T > ( ) ;
1471
1467
let ptr = self . ptr . cast :: < u8 > ( ) . as_ptr ( ) . wrapping_offset ( offset) ;
@@ -1483,8 +1479,6 @@ impl<T> Weak<T> {
1483
1479
/// # Examples
1484
1480
///
1485
1481
/// ```
1486
- /// #![feature(weak_into_raw)]
1487
- ///
1488
1482
/// use std::sync::{Arc, Weak};
1489
1483
///
1490
1484
/// let strong = Arc::new("hello".to_owned());
@@ -1500,7 +1494,7 @@ impl<T> Weak<T> {
1500
1494
///
1501
1495
/// [`from_raw`]: struct.Weak.html#method.from_raw
1502
1496
/// [`as_ptr`]: struct.Weak.html#method.as_ptr
1503
- #[ unstable ( feature = "weak_into_raw" , issue = "60728 " ) ]
1497
+ #[ stable ( feature = "weak_into_raw" , since = "1.45.0 " ) ]
1504
1498
pub fn into_raw ( self ) -> * const T {
1505
1499
let result = self . as_ptr ( ) ;
1506
1500
mem:: forget ( self ) ;
@@ -1528,8 +1522,6 @@ impl<T> Weak<T> {
1528
1522
/// # Examples
1529
1523
///
1530
1524
/// ```
1531
- /// #![feature(weak_into_raw)]
1532
- ///
1533
1525
/// use std::sync::{Arc, Weak};
1534
1526
///
1535
1527
/// let strong = Arc::new("hello".to_owned());
@@ -1554,7 +1546,7 @@ impl<T> Weak<T> {
1554
1546
/// [`Weak`]: struct.Weak.html
1555
1547
/// [`Arc`]: struct.Arc.html
1556
1548
/// [`forget`]: ../../std/mem/fn.forget.html
1557
- #[ unstable ( feature = "weak_into_raw" , issue = "60728 " ) ]
1549
+ #[ stable ( feature = "weak_into_raw" , since = "1.45.0 " ) ]
1558
1550
pub unsafe fn from_raw ( ptr : * const T ) -> Self {
1559
1551
if ptr. is_null ( ) {
1560
1552
Self :: new ( )
0 commit comments