about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-08-22 13:21:24 +0000
committerbors <bors@rust-lang.org>2020-08-22 13:21:24 +0000
commit527a685e40d8fbe61442bdbd510c2b4e1d248019 (patch)
treec8307e97c04d56a3631ecb5abc040e2af3893833
parent108e90ca78f052c0c1c49c42a22c85620be19712 (diff)
parent2500b6df14eacaf993a53058ff1793d1526df9a5 (diff)
downloadrust-527a685e40d8fbe61442bdbd510c2b4e1d248019.tar.gz
rust-527a685e40d8fbe61442bdbd510c2b4e1d248019.zip
Auto merge of #75783 - denisvasilik:intra-doc-links-core-alloc, r=jyn514
Move to intra-doc links for library/core/src/alloc/{layout, global, mod}.rs

Helps with #75080. The files already contained intra-doc links, so there are only minor changes.

@rustbot modify labels: T-doc, A-intra-doc-links, T-rustdoc

Known issues:

* [`handle_alloc_error`]: Link from `core` to `alloc` could not be resolved.
* [`slice`]: slice is a primitive type, but could not be resolved; had to use [`crate::slice`] instead.
-rw-r--r--library/core/src/alloc/layout.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/library/core/src/alloc/layout.rs b/library/core/src/alloc/layout.rs
index 7129f0f2402..a5ddf7619b6 100644
--- a/library/core/src/alloc/layout.rs
+++ b/library/core/src/alloc/layout.rs
@@ -85,7 +85,7 @@ impl Layout {
     /// # Safety
     ///
     /// This function is unsafe as it does not verify the preconditions from
-    /// [`Layout::from_size_align`](#method.from_size_align).
+    /// [`Layout::from_size_align`].
     #[stable(feature = "alloc_layout", since = "1.28.0")]
     #[rustc_const_stable(feature = "alloc_layout", since = "1.28.0")]
     #[inline]
@@ -196,8 +196,7 @@ impl Layout {
     /// will *still* have size 16.
     ///
     /// Returns an error if the combination of `self.size()` and the given
-    /// `align` violates the conditions listed in
-    /// [`Layout::from_size_align`](#method.from_size_align).
+    /// `align` violates the conditions listed in [`Layout::from_size_align`].
     #[stable(feature = "alloc_layout_manipulation", since = "1.44.0")]
     #[inline]
     pub fn align_to(&self, align: usize) -> Result<Self, LayoutErr> {