@@ -34,8 +34,8 @@ use crate::slice::{self, SliceIndex};
3434/// it is your responsibility to ensure that `as_mut` is never called, and `as_ptr`
3535/// is never used for mutation.
3636///
37- /// [`PhantomData`]: ../ marker/struct. PhantomData.html
38- /// [`UnsafeCell<T>`]: ../ cell/struct. UnsafeCell.html
37+ /// [`PhantomData`]: crate:: marker:: PhantomData
38+ /// [`UnsafeCell<T>`]: crate:: cell:: UnsafeCell
3939#[ stable( feature = "nonnull" , since = "1.25.0" ) ]
4040#[ repr( transparent) ]
4141#[ rustc_layout_scalar_valid_range_start( 1 ) ]
@@ -82,8 +82,8 @@ impl<T: Sized> NonNull<T> {
8282 ///
8383 /// For the mutable counterpart see [`as_uninit_mut`].
8484 ///
85- /// [`as_ref`]: #method. as_ref
86- /// [`as_uninit_mut`]: #method. as_uninit_mut
85+ /// [`as_ref`]: NonNull:: as_ref
86+ /// [`as_uninit_mut`]: NonNull:: as_uninit_mut
8787 ///
8888 /// # Safety
8989 ///
@@ -114,8 +114,8 @@ impl<T: Sized> NonNull<T> {
114114 ///
115115 /// For the shared counterpart see [`as_uninit_ref`].
116116 ///
117- /// [`as_mut`]: #method. as_mut
118- /// [`as_uninit_ref`]: #method. as_uninit_ref
117+ /// [`as_mut`]: NonNull:: as_mut
118+ /// [`as_uninit_ref`]: NonNull:: as_uninit_ref
119119 ///
120120 /// # Safety
121121 ///
@@ -181,8 +181,8 @@ impl<T: ?Sized> NonNull<T> {
181181 ///
182182 /// For the mutable counterpart see [`as_mut`].
183183 ///
184- /// [`as_uninit_ref`]: #method. as_uninit_ref
185- /// [`as_mut`]: #method. as_mut
184+ /// [`as_uninit_ref`]: NonNull:: as_uninit_ref
185+ /// [`as_mut`]: NonNull:: as_mut
186186 ///
187187 /// # Safety
188188 ///
@@ -217,8 +217,8 @@ impl<T: ?Sized> NonNull<T> {
217217 ///
218218 /// For the shared counterpart see [`as_ref`].
219219 ///
220- /// [`as_uninit_mut`]: #method. as_uninit_mut
221- /// [`as_ref`]: #method. as_ref
220+ /// [`as_uninit_mut`]: NonNull:: as_uninit_mut
221+ /// [`as_ref`]: NonNull:: as_ref
222222 ///
223223 /// # Safety
224224 ///
@@ -266,8 +266,6 @@ impl<T> NonNull<[T]> {
266266 /// This function is safe, but dereferencing the return value is unsafe.
267267 /// See the documentation of [`slice::from_raw_parts`] for slice safety requirements.
268268 ///
269- /// [`slice::from_raw_parts`]: ../../std/slice/fn.from_raw_parts.html
270- ///
271269 /// # Examples
272270 ///
273271 /// ```rust
@@ -357,8 +355,8 @@ impl<T> NonNull<[T]> {
357355 ///
358356 /// For the mutable counterpart see [`as_uninit_slice_mut`].
359357 ///
360- /// [`as_ref`]: #method. as_ref
361- /// [`as_uninit_slice_mut`]: #method. as_uninit_slice_mut
358+ /// [`as_ref`]: NonNull:: as_ref
359+ /// [`as_uninit_slice_mut`]: NonNull:: as_uninit_slice_mut
362360 ///
363361 /// # Safety
364362 ///
@@ -386,10 +384,9 @@ impl<T> NonNull<[T]> {
386384 ///
387385 /// This applies even if the result of this method is unused!
388386 ///
389- /// See also [`slice::from_raw_parts`][] .
387+ /// See also [`slice::from_raw_parts`].
390388 ///
391389 /// [valid]: crate::ptr#safety
392- /// [`NonNull::dangling()`]: NonNull::dangling
393390 /// [`pointer::offset`]: ../../std/primitive.pointer.html#method.offset
394391 #[ inline]
395392 #[ unstable( feature = "ptr_as_uninit" , issue = "75402" ) ]
@@ -403,8 +400,8 @@ impl<T> NonNull<[T]> {
403400 ///
404401 /// For the shared counterpart see [`as_uninit_slice`].
405402 ///
406- /// [`as_mut`]: #method. as_mut
407- /// [`as_uninit_slice`]: #method. as_uninit_slice
403+ /// [`as_mut`]: NonNull:: as_mut
404+ /// [`as_uninit_slice`]: NonNull:: as_uninit_slice
408405 ///
409406 /// # Safety
410407 ///
@@ -432,10 +429,9 @@ impl<T> NonNull<[T]> {
432429 ///
433430 /// This applies even if the result of this method is unused!
434431 ///
435- /// See also [`slice::from_raw_parts_mut`][] .
432+ /// See also [`slice::from_raw_parts_mut`].
436433 ///
437434 /// [valid]: crate::ptr#safety
438- /// [`NonNull::dangling()`]: NonNull::dangling
439435 /// [`pointer::offset`]: ../../std/primitive.pointer.html#method.offset
440436 ///
441437 /// # Examples
0 commit comments