about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-08-02 12:14:18 +0200
committerGitHub <noreply@github.com>2019-08-02 12:14:18 +0200
commitdbfe12daed1ede9d2ccb6bf749143368bc5eade4 (patch)
treee7ee1d0a58556039d057087b74bfc8ef2d1f61a1 /src/libcore
parent5155c7ea688b4025f4d25233e0f8353f51107269 (diff)
parent325c6a56c274678f294bfa25ee43e1eef48f46a2 (diff)
downloadrust-dbfe12daed1ede9d2ccb6bf749143368bc5eade4.tar.gz
rust-dbfe12daed1ede9d2ccb6bf749143368bc5eade4.zip
Rollup merge of #63189 - waywardmonkeys:doc-improvements, r=Centril
Doc improvements

Miscellaneous documentation fixes.
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/array.rs5
-rw-r--r--src/libcore/convert.rs2
-rw-r--r--src/libcore/future/future.rs4
-rw-r--r--src/libcore/mem/maybe_uninit.rs2
-rw-r--r--src/libcore/ptr/mod.rs4
5 files changed, 11 insertions, 6 deletions
diff --git a/src/libcore/array.rs b/src/libcore/array.rs
index 517893a1967..b5614010e5c 100644
--- a/src/libcore/array.rs
+++ b/src/libcore/array.rs
@@ -24,9 +24,12 @@ use crate::slice::{Iter, IterMut};
 /// layout in memory of a fixed size array (for example, for unsafe
 /// initialization).
 ///
-/// Note that the traits AsRef and AsMut provide similar methods for types that
+/// Note that the traits [`AsRef`] and [`AsMut`] provide similar methods for types that
 /// may not be fixed-size arrays. Implementors should prefer those traits
 /// instead.
+///
+/// [`AsRef`]: ../convert/trait.AsRef.html
+/// [`AsMut`]: ../convert/trait.AsMut.html
 #[unstable(feature = "fixed_size_array", issue = "27778")]
 pub unsafe trait FixedSizeArray<T> {
     /// Converts the array to immutable slice
diff --git a/src/libcore/convert.rs b/src/libcore/convert.rs
index db3dde3fea6..624b13d9647 100644
--- a/src/libcore/convert.rs
+++ b/src/libcore/convert.rs
@@ -427,7 +427,7 @@ pub trait TryInto<T>: Sized {
 /// - [`try_from`] is reflexive, which means that `TryFrom<T> for T`
 /// is implemented and cannot fail -- the associated `Error` type for
 /// calling `T::try_from()` on a value of type `T` is [`Infallible`].
-/// When the [`!`] type is stablized [`Infallible`] and [`!`] will be
+/// When the [`!`] type is stabilized [`Infallible`] and [`!`] will be
 /// equivalent.
 ///
 /// `TryFrom<T>` can be implemented as follows:
diff --git a/src/libcore/future/future.rs b/src/libcore/future/future.rs
index 8bd1601a362..593c01060ca 100644
--- a/src/libcore/future/future.rs
+++ b/src/libcore/future/future.rs
@@ -17,11 +17,13 @@ use crate::task::{Context, Poll};
 /// final value. This method does not block if the value is not ready. Instead,
 /// the current task is scheduled to be woken up when it's possible to make
 /// further progress by `poll`ing again. The `context` passed to the `poll`
-/// method can provide a `Waker`, which is a handle for waking up the current
+/// method can provide a [`Waker`], which is a handle for waking up the current
 /// task.
 ///
 /// When using a future, you generally won't call `poll` directly, but instead
 /// `.await` the value.
+///
+/// [`Waker`]: ../task/struct.Waker.html
 #[doc(spotlight)]
 #[must_use = "futures do nothing unless you `.await` or poll them"]
 #[stable(feature = "futures_api", since = "1.36.0")]
diff --git a/src/libcore/mem/maybe_uninit.rs b/src/libcore/mem/maybe_uninit.rs
index 2e88db8df11..64fdf504369 100644
--- a/src/libcore/mem/maybe_uninit.rs
+++ b/src/libcore/mem/maybe_uninit.rs
@@ -434,7 +434,7 @@ impl<T> MaybeUninit<T> {
     /// Reads the value from the `MaybeUninit<T>` container. The resulting `T` is subject
     /// to the usual drop handling.
     ///
-    /// Whenever possible, it is preferrable to use [`assume_init`] instead, which
+    /// Whenever possible, it is preferable to use [`assume_init`] instead, which
     /// prevents duplicating the content of the `MaybeUninit<T>`.
     ///
     /// # Safety
diff --git a/src/libcore/ptr/mod.rs b/src/libcore/ptr/mod.rs
index a1f96905dc9..0ec4dd47b1f 100644
--- a/src/libcore/ptr/mod.rs
+++ b/src/libcore/ptr/mod.rs
@@ -1611,7 +1611,7 @@ impl<T: ?Sized> *const T {
     /// The offset is expressed in number of `T` elements, and not bytes. The value returned can be
     /// used with the `add` method.
     ///
-    /// There are no guarantees whatsover that offsetting the pointer will not overflow or go
+    /// There are no guarantees whatsoever that offsetting the pointer will not overflow or go
     /// beyond the allocation that the pointer points into. It is up to the caller to ensure that
     /// the returned offset is correct in all terms other than alignment.
     ///
@@ -2412,7 +2412,7 @@ impl<T: ?Sized> *mut T {
     /// The offset is expressed in number of `T` elements, and not bytes. The value returned can be
     /// used with the `add` method.
     ///
-    /// There are no guarantees whatsover that offsetting the pointer will not overflow or go
+    /// There are no guarantees whatsoever that offsetting the pointer will not overflow or go
     /// beyond the allocation that the pointer points into. It is up to the caller to ensure that
     /// the returned offset is correct in all terms other than alignment.
     ///