@@ -2869,10 +2869,10 @@ impl<'a, T: ?Sized> From<NonNull<T>> for Unique<T> {
2869
2869
/// However the pointer may still dangle if it isn't dereferenced.
2870
2870
///
2871
2871
/// Unlike `*mut T`, `NonNull<T>` is covariant over `T`. If this is incorrect
2872
- /// for your use case, you should include some PhantomData in your type to
2872
+ /// for your use case, you should include some [` PhantomData`] in your type to
2873
2873
/// provide invariance, such as `PhantomData<Cell<T>>` or `PhantomData<&'a mut T>`.
2874
2874
/// Usually this won't be necessary; covariance is correct for most safe abstractions,
2875
- /// such as Box, Rc, Arc, Vec, and LinkedList. This is the case because they
2875
+ /// such as ` Box`, `Rc`, ` Arc`, ` Vec` , and ` LinkedList` . This is the case because they
2876
2876
/// provide a public API that follows the normal shared XOR mutable rules of Rust.
2877
2877
///
2878
2878
/// Notice that `NonNull<T>` has a `From` instance for `&T`. However, this does
@@ -2883,6 +2883,7 @@ impl<'a, T: ?Sized> From<NonNull<T>> for Unique<T> {
2883
2883
/// it is your responsibility to ensure that `as_mut` is never called, and `as_ptr`
2884
2884
/// is never used for mutation.
2885
2885
///
2886
+ /// [`PhantomData`]: ../marker/struct.PhantomData.html
2886
2887
/// [`UnsafeCell<T>`]: ../cell/struct.UnsafeCell.html
2887
2888
#[ stable( feature = "nonnull" , since = "1.25.0" ) ]
2888
2889
#[ repr( transparent) ]
0 commit comments