about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAmjad Alsharafi <amjadsharafi10@gmail.com>2020-08-30 15:22:27 +0800
committerAmjad Alsharafi <amjadsharafi10@gmail.com>2020-08-30 15:22:27 +0800
commit300a0072a27f9c2d64ea63cea3b15463383683b0 (patch)
tree62323311d2c642a4e4def742e66791f423b86d92
parent6aae4a2fe68f0025d0bae0e97e614bfd3540eb97 (diff)
downloadrust-300a0072a27f9c2d64ea63cea3b15463383683b0.tar.gz
rust-300a0072a27f9c2d64ea63cea3b15463383683b0.zip
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.
-rw-r--r--library/core/src/slice/mod.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/library/core/src/slice/mod.rs b/library/core/src/slice/mod.rs
index a7c6c53722a..7de382b366c 100644
--- a/library/core/src/slice/mod.rs
+++ b/library/core/src/slice/mod.rs
@@ -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")]