From 86633b63894438a8eaad521ccca98d66104579ba Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Thu, 1 Aug 2019 15:13:31 +0700 Subject: [PATCH] Fix typos in doc comments. --- src/libcore/convert.rs | 2 +- src/libcore/mem/maybe_uninit.rs | 2 +- src/libcore/ptr/mod.rs | 4 ++-- src/librustc/traits/select.rs | 4 ++-- src/libsyntax/parse/mod.rs | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) 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: Sized { /// - [`try_from`] is reflexive, which means that `TryFrom 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` can be implemented as follows: 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 MaybeUninit { /// Reads the value from the `MaybeUninit` 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`. /// /// # 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 *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 *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. /// diff --git a/src/librustc/traits/select.rs b/src/librustc/traits/select.rs index 798a25fe7b1..2486f29ab0f 100644 --- a/src/librustc/traits/select.rs +++ b/src/librustc/traits/select.rs @@ -167,7 +167,7 @@ struct TraitObligationStack<'prev, 'tcx> { /// ok on the premise that if `A: AutoTrait` held, but we indeed /// encountered a problem (later on) with `A: AutoTrait. So we /// currently set a flag on the stack node for `B: AutoTrait` (as - /// well as the second instance of `A: AutoTrait`) to supress + /// well as the second instance of `A: AutoTrait`) to suppress /// caching. /// /// This is a simple, targeted fix. A more-performant fix requires @@ -1105,7 +1105,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> { /// /// - is a defaulted trait, /// - it also appears in the backtrace at some position `X`, - /// - all the predicates at positions `X..` between `X` an the top are + /// - all the predicates at positions `X..` between `X` and the top are /// also defaulted traits. pub fn coinductive_match(&mut self, cycle: I) -> bool where diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs index 1aac8bbb7aa..002aa2f891e 100644 --- a/src/libsyntax/parse/mod.rs +++ b/src/libsyntax/parse/mod.rs @@ -368,7 +368,7 @@ pub fn stream_to_parser_with_base_dir<'a>( /// A sequence separator. pub struct SeqSep { - /// The seperator token. + /// The separator token. pub sep: Option, /// `true` if a trailing separator is allowed. pub trailing_sep_allowed: bool,