diff --git a/src/lib.rs b/src/lib.rs index 6a17baf..2749aa3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -123,6 +123,7 @@ use alloc::boxed::Box; use alloc::rc::Rc; use alloc::sync::Arc; +/// `&T` —▸ `T` pub fn clone(t: &T) -> T where T: DynClone, @@ -130,6 +131,7 @@ where unsafe { *Box::from_raw(::__clone_box(t, Private) as *mut T) } } +/// `&T` —▸ `Box` pub fn clone_box(t: &T) -> Box where T: ?Sized + DynClone, @@ -143,6 +145,7 @@ where unsafe { Box::from_raw(fat_ptr as *mut T) } } +/// `&mut Arc` —▸ `&mut T` pub fn arc_make_mut(arc: &mut Arc) -> &mut T where T: ?Sized + DynClone, @@ -168,6 +171,7 @@ where unsafe { &mut *ptr } } +/// `&mut Rc` —▸ `&mut T` pub fn rc_make_mut(rc: &mut Rc) -> &mut T where T: ?Sized + DynClone,