diff options
| author | Frank Steffahn <frank.steffahn@stu.uni-kiel.de> | 2021-12-14 15:23:34 +0100 |
|---|---|---|
| committer | Frank Steffahn <frank.steffahn@stu.uni-kiel.de> | 2021-12-14 16:40:43 +0100 |
| commit | a957cefda63c76c7a91a705f683be45c684d4303 (patch) | |
| tree | eb1e40688623beacc96cf77d3721d21f6ee97e86 /library/core/src | |
| parent | 404c8471aba60c2d837fa728e7c729a0f52d5830 (diff) | |
| download | rust-a957cefda63c76c7a91a705f683be45c684d4303.tar.gz rust-a957cefda63c76c7a91a705f683be45c684d4303.zip | |
Fix a bunch of typos
Diffstat (limited to 'library/core/src')
| -rw-r--r-- | library/core/src/alloc/layout.rs | 4 | ||||
| -rw-r--r-- | library/core/src/cell.rs | 6 | ||||
| -rw-r--r-- | library/core/src/iter/adapters/zip.rs | 2 | ||||
| -rw-r--r-- | library/core/src/iter/range.rs | 4 | ||||
| -rw-r--r-- | library/core/src/num/dec2flt/number.rs | 2 | ||||
| -rw-r--r-- | library/core/src/num/fmt.rs | 2 | ||||
| -rw-r--r-- | library/core/src/slice/iter.rs | 2 | ||||
| -rw-r--r-- | library/core/src/slice/rotate.rs | 6 | ||||
| -rw-r--r-- | library/core/src/str/iter.rs | 18 |
9 files changed, 23 insertions, 23 deletions
diff --git a/library/core/src/alloc/layout.rs b/library/core/src/alloc/layout.rs index 9df0b5c5519..ea639268652 100644 --- a/library/core/src/alloc/layout.rs +++ b/library/core/src/alloc/layout.rs @@ -157,11 +157,11 @@ impl Layout { /// /// - If `T` is `Sized`, this function is always safe to call. /// - If the unsized tail of `T` is: - /// - a [slice], then the length of the slice tail must be an intialized + /// - a [slice], then the length of the slice tail must be an initialized /// integer, and the size of the *entire value* /// (dynamic tail length + statically sized prefix) must fit in `isize`. /// - a [trait object], then the vtable part of the pointer must point - /// to a valid vtable for the type `T` acquired by an unsizing coersion, + /// to a valid vtable for the type `T` acquired by an unsizing coercion, /// and the size of the *entire value* /// (dynamic tail length + statically sized prefix) must fit in `isize`. /// - an (unstable) [extern type], then this function is always safe to diff --git a/library/core/src/cell.rs b/library/core/src/cell.rs index 06dc5ecf2ff..bc3f7167fac 100644 --- a/library/core/src/cell.rs +++ b/library/core/src/cell.rs @@ -898,7 +898,7 @@ impl<T: ?Sized> RefCell<T> { Ok(Ref { value: unsafe { &*self.value.get() }, borrow: b }) } None => Err(BorrowError { - // If a borrow occured, then we must already have an outstanding borrow, + // If a borrow occurred, then we must already have an outstanding borrow, // so `borrowed_at` will be `Some` #[cfg(feature = "debug_refcell")] location: self.borrowed_at.get().unwrap(), @@ -983,7 +983,7 @@ impl<T: ?Sized> RefCell<T> { Ok(RefMut { value: unsafe { &mut *self.value.get() }, borrow: b }) } None => Err(BorrowMutError { - // If a borrow occured, then we must already have an outstanding borrow, + // If a borrow occurred, then we must already have an outstanding borrow, // so `borrowed_at` will be `Some` #[cfg(feature = "debug_refcell")] location: self.borrowed_at.get().unwrap(), @@ -1104,7 +1104,7 @@ impl<T: ?Sized> RefCell<T> { Ok(unsafe { &*self.value.get() }) } else { Err(BorrowError { - // If a borrow occured, then we must already have an outstanding borrow, + // If a borrow occurred, then we must already have an outstanding borrow, // so `borrowed_at` will be `Some` #[cfg(feature = "debug_refcell")] location: self.borrowed_at.get().unwrap(), diff --git a/library/core/src/iter/adapters/zip.rs b/library/core/src/iter/adapters/zip.rs index 920fa59c8ad..b8c3cd847e4 100644 --- a/library/core/src/iter/adapters/zip.rs +++ b/library/core/src/iter/adapters/zip.rs @@ -517,7 +517,7 @@ impl<A: Debug + TrustedRandomAccessNoCoerce, B: Debug + TrustedRandomAccessNoCoe /// * It must also be safe to drop `self` after calling `self.__iterator_get_unchecked(idx)`. /// * If `T` is a subtype of `Self`, then it must be safe to coerce `self` to `T`. // -// FIXME: Clarify interaction with SourceIter/InPlaceIterable. Calling `SouceIter::as_inner` +// FIXME: Clarify interaction with SourceIter/InPlaceIterable. Calling `SourceIter::as_inner` // after `__iterator_get_unchecked` is supposed to be allowed. #[doc(hidden)] #[unstable(feature = "trusted_random_access", issue = "none")] diff --git a/library/core/src/iter/range.rs b/library/core/src/iter/range.rs index 06733a1b50b..0ae94c05da6 100644 --- a/library/core/src/iter/range.rs +++ b/library/core/src/iter/range.rs @@ -777,7 +777,7 @@ range_exact_iter_impl! { usize u8 u16 isize i8 i16 - // These are incorect per the reasoning above, + // These are incorrect per the reasoning above, // but removing them would be a breaking change as they were stabilized in Rust 1.0.0. // So e.g. `(0..66_000_u32).len()` for example will compile without error or warnings // on 16-bit platforms, but continue to give a wrong result. @@ -805,7 +805,7 @@ range_incl_exact_iter_impl! { u8 i8 - // These are incorect per the reasoning above, + // These are incorrect per the reasoning above, // but removing them would be a breaking change as they were stabilized in Rust 1.26.0. // So e.g. `(0..=u16::MAX).len()` for example will compile without error or warnings // on 16-bit platforms, but continue to give a wrong result. diff --git a/library/core/src/num/dec2flt/number.rs b/library/core/src/num/dec2flt/number.rs index 36432718af4..405f7e7b613 100644 --- a/library/core/src/num/dec2flt/number.rs +++ b/library/core/src/num/dec2flt/number.rs @@ -40,7 +40,7 @@ impl Number { && !self.many_digits } - /// The fast path algorithmn using machine-sized integers and floats. + /// The fast path algorithm using machine-sized integers and floats. /// /// This is extracted into a separate function so that it can be attempted before constructing /// a Decimal. This only works if both the mantissa and the exponent diff --git a/library/core/src/num/fmt.rs b/library/core/src/num/fmt.rs index 578288bda25..ed61197157b 100644 --- a/library/core/src/num/fmt.rs +++ b/library/core/src/num/fmt.rs @@ -1,4 +1,4 @@ -//! Shared utilties used by both float and integer formatting. +//! Shared utilities used by both float and integer formatting. #![doc(hidden)] #