Commit 878a796 1 parent 604d669 commit 878a796 Copy full SHA for 878a796
File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -1376,6 +1376,8 @@ impl<T: ?Sized> Arc<T> {
1376
1376
/// different types. See [`mem::transmute`][transmute] for more information
1377
1377
/// on what restrictions apply in this case.
1378
1378
///
1379
+ /// The raw pointer must point to a block of memory allocated by the global allocator
1380
+ ///
1379
1381
/// The user of `from_raw` has to make sure a specific value of `T` is only
1380
1382
/// dropped once.
1381
1383
///
@@ -1431,7 +1433,8 @@ impl<T: ?Sized> Arc<T> {
1431
1433
///
1432
1434
/// The pointer must have been obtained through `Arc::into_raw`, and the
1433
1435
/// associated `Arc` instance must be valid (i.e. the strong count must be at
1434
- /// least 1) for the duration of this method.
1436
+ /// least 1) for the duration of this method, and `ptr` must point to a block of memory
1437
+ /// allocated by the global allocator.
1435
1438
///
1436
1439
/// # Examples
1437
1440
///
@@ -1465,7 +1468,8 @@ impl<T: ?Sized> Arc<T> {
1465
1468
///
1466
1469
/// The pointer must have been obtained through `Arc::into_raw`, and the
1467
1470
/// associated `Arc` instance must be valid (i.e. the strong count must be at
1468
- /// least 1) when invoking this method. This method can be used to release the final
1471
+ /// least 1) when invoking this method, and `ptr` must point to a block of memory
1472
+ /// allocated by the global allocator. This method can be used to release the final
1469
1473
/// `Arc` and backing storage, but **should not** be called after the final `Arc` has been
1470
1474
/// released.
1471
1475
///
You can’t perform that action at this time.
0 commit comments