Fix intra-doc path resolution problem in library/alloc/src/slice.rs

`alloc::slice` uses `core::slice` functions, documentation are copied
from there and the links as well without resolution. `crate::ptr...`
cannot be resolved in `alloc::slice`, but `ptr` itself is imported in
both `alloc::slice` and `core::slice`, so we used that instead.
This commit is contained in:
Amjad Alsharafi 2020-08-30 15:22:27 +08:00
parent 6aae4a2fe6
commit 300a0072a2

View File

@ -6427,8 +6427,8 @@ unsafe impl<'a, T> TrustedRandomAccess for RChunksExactMut<'a, T> {
/// }
/// ```
///
/// [valid]: crate::ptr#safety
/// [`NonNull::dangling()`]: crate::ptr::NonNull::dangling
/// [valid]: ptr#safety
/// [`NonNull::dangling()`]: ptr::NonNull::dangling
/// [`pointer::offset`]: ../../std/primitive.pointer.html#method.offset
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
@ -6467,8 +6467,8 @@ pub unsafe fn from_raw_parts<'a, T>(data: *const T, len: usize) -> &'a [T] {
/// * The total size `len * mem::size_of::<T>()` of the slice must be no larger than `isize::MAX`.
/// See the safety documentation of [`pointer::offset`].
///
/// [valid]: crate::ptr#safety
/// [`NonNull::dangling()`]: crate::ptr::NonNull::dangling
/// [valid]: ptr#safety
/// [`NonNull::dangling()`]: ptr::NonNull::dangling
/// [`pointer::offset`]: ../../std/primitive.pointer.html#method.offset
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]