@@ -1327,11 +1327,14 @@ impl<T: ?Sized> Rc<T> {
1327
1327
///
1328
1328
/// # Safety
1329
1329
///
1330
- /// The pointer must have been obtained through `Rc::into_raw`, the
1331
- /// associated `Rc` instance must be valid (i.e. the strong count must be at
1330
+ /// The pointer must have been obtained through `Rc::into_raw` and must satisfy the
1331
+ /// same layout requirements specified in [`Rc::from_raw_in`][from_raw_in].
1332
+ /// The associated `Rc` instance must be valid (i.e. the strong count must be at
1332
1333
/// least 1) for the duration of this method, and `ptr` must point to a block of memory
1333
1334
/// allocated by the global allocator.
1334
1335
///
1336
+ /// [from_raw_in]: Rc::from_raw_in
1337
+ ///
1335
1338
/// # Examples
1336
1339
///
1337
1340
/// ```
@@ -1360,12 +1363,15 @@ impl<T: ?Sized> Rc<T> {
1360
1363
///
1361
1364
/// # Safety
1362
1365
///
1363
- /// The pointer must have been obtained through `Rc::into_raw`, the
1364
- /// associated `Rc` instance must be valid (i.e. the strong count must be at
1366
+ /// The pointer must have been obtained through `Rc::into_raw`and must satisfy the
1367
+ /// same layout requirements specified in [`Rc::from_raw_in`][from_raw_in].
1368
+ /// The associated `Rc` instance must be valid (i.e. the strong count must be at
1365
1369
/// least 1) when invoking this method, and `ptr` must point to a block of memory
1366
1370
/// allocated by the global allocator. This method can be used to release the final `Rc` and
1367
1371
/// backing storage, but **should not** be called after the final `Rc` has been released.
1368
1372
///
1373
+ /// [from_raw_in]: Rc::from_raw_in
1374
+ ///
1369
1375
/// # Examples
1370
1376
///
1371
1377
/// ```
@@ -1623,10 +1629,13 @@ impl<T: ?Sized, A: Allocator> Rc<T, A> {
1623
1629
///
1624
1630
/// # Safety
1625
1631
///
1626
- /// The pointer must have been obtained through `Rc::into_raw`, the
1627
- /// associated `Rc` instance must be valid (i.e. the strong count must be at
1632
+ /// The pointer must have been obtained through `Rc::into_raw` and must satisfy the
1633
+ /// same layout requirements specified in [`Rc::from_raw_in`][from_raw_in].
1634
+ /// The associated `Rc` instance must be valid (i.e. the strong count must be at
1628
1635
/// least 1) for the duration of this method, and `ptr` must point to a block of memory
1629
- /// allocated by `alloc`
1636
+ /// allocated by `alloc`.
1637
+ ///
1638
+ /// [from_raw_in]: Rc::from_raw_in
1630
1639
///
1631
1640
/// # Examples
1632
1641
///
@@ -1665,11 +1674,14 @@ impl<T: ?Sized, A: Allocator> Rc<T, A> {
1665
1674
///
1666
1675
/// # Safety
1667
1676
///
1668
- /// The pointer must have been obtained through `Rc::into_raw`, the
1669
- /// associated `Rc` instance must be valid (i.e. the strong count must be at
1677
+ /// The pointer must have been obtained through `Rc::into_raw`and must satisfy the
1678
+ /// same layout requirements specified in [`Rc::from_raw_in`][from_raw_in].
1679
+ /// The associated `Rc` instance must be valid (i.e. the strong count must be at
1670
1680
/// least 1) when invoking this method, and `ptr` must point to a block of memory
1671
- /// allocated by `alloc`. This method can be used to release the final `Rc` and backing storage,
1672
- /// but **should not** be called after the final `Rc` has been released.
1681
+ /// allocated by `alloc`. This method can be used to release the final `Rc` and
1682
+ /// backing storage, but **should not** be called after the final `Rc` has been released.
1683
+ ///
1684
+ /// [from_raw_in]: Rc::from_raw_in
1673
1685
///
1674
1686
/// # Examples
1675
1687
///
0 commit comments