File tree 1 file changed +6
-5
lines changed
1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -886,11 +886,11 @@ impl<T: ?Sized> Arc<T> {
886
886
/// Constructs an `Arc<T>` from a raw pointer.
887
887
///
888
888
/// The raw pointer must have been previously returned by a call to
889
- /// [`Arc<U>::into_raw`][into_raw] where `U` must have the same size and
890
- /// alignment as `T`. This is trivially true if `U` is `T`.
891
- /// Note that if `U` is not `T` but has the same size and alignment, this is
892
- /// basically like transmuting references of different types. See
893
- /// [`mem::transmute`][transmute] for more information on what
889
+ /// [`Arc<U>::into_raw`][into_raw] or [`Arc::<U>::as_ptr`][as_ptr] where `U`
890
+ /// must have the same size and alignment as `T`. This is trivially true
891
+ /// if `U` is `T`. Note that if `U` is not `T` but has the same size and
892
+ /// alignment, this is basically like transmuting references of different
893
+ /// types. See [`mem::transmute`][transmute] for more information on what
894
894
/// restrictions apply in this case.
895
895
///
896
896
/// The user of `from_raw` has to make sure a specific value of `T` is only
@@ -900,6 +900,7 @@ impl<T: ?Sized> Arc<T> {
900
900
/// even if the returned `Arc<T>` is never accessed.
901
901
///
902
902
/// [into_raw]: Arc::into_raw
903
+ /// [as_ptr]: Arc::as_ptr
903
904
/// [transmute]: core::mem::transmute
904
905
///
905
906
/// # Examples
You can’t perform that action at this time.
0 commit comments