diff options
| author | Amjad Alsharafi <amjadsharafi10@gmail.com> | 2020-08-30 15:22:27 +0800 |
|---|---|---|
| committer | Amjad Alsharafi <amjadsharafi10@gmail.com> | 2020-08-30 15:22:27 +0800 |
| commit | 300a0072a27f9c2d64ea63cea3b15463383683b0 (patch) | |
| tree | 62323311d2c642a4e4def742e66791f423b86d92 | |
| parent | 6aae4a2fe68f0025d0bae0e97e614bfd3540eb97 (diff) | |
| download | rust-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.rs | 8 |
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")] |
