From be1d5dd494172ad8ff1676a52762f3fe90d2ffcb Mon Sep 17 00:00:00 2001 From: oliveredget <188809800+oliveredget@users.noreply.github.com> Date: Tue, 24 Dec 2024 23:37:30 +0800 Subject: [PATCH] chore: fix typos --- library/core/src/macros/mod.rs | 2 +- library/core/src/str/lossy.rs | 4 ++-- library/core/tests/iter/adapters/take.rs | 2 +- src/tools/compiletest/src/read2.rs | 2 +- tests/ui/traits/non_lifetime_binders/basic.rs | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/library/core/src/macros/mod.rs b/library/core/src/macros/mod.rs index ab674b58902b5..402b436d28e68 100644 --- a/library/core/src/macros/mod.rs +++ b/library/core/src/macros/mod.rs @@ -1549,7 +1549,7 @@ pub(crate) mod builtin { /// NAME is a string that represents a valid function name. /// MODE is any of Forward, Reverse, ForwardFirst, ReverseFirst. /// INPUT_ACTIVITIES consists of one valid activity for each input parameter. - /// OUTPUT_ACTIVITY must not be set if we implicitely return nothing (or explicitely return + /// OUTPUT_ACTIVITY must not be set if we implicitly return nothing (or explicitly return /// `-> ()`). Otherwise it must be set to one of the allowed activities. #[unstable(feature = "autodiff", issue = "124509")] #[allow_internal_unstable(rustc_attrs)] diff --git a/library/core/src/str/lossy.rs b/library/core/src/str/lossy.rs index e7677c8317a9f..ed2cefc59a51c 100644 --- a/library/core/src/str/lossy.rs +++ b/library/core/src/str/lossy.rs @@ -8,7 +8,7 @@ impl [u8] { /// Creates an iterator over the contiguous valid UTF-8 ranges of this /// slice, and the non-UTF-8 fragments in between. /// - /// See the [`Utf8Chunk`] type for documenation of the items yielded by this iterator. + /// See the [`Utf8Chunk`] type for documentation of the items yielded by this iterator. /// /// # Examples /// @@ -150,7 +150,7 @@ impl fmt::Debug for Debug<'_> { /// If you want a simple conversion from UTF-8 byte slices to string slices, /// [`from_utf8`] is easier to use. /// -/// See the [`Utf8Chunk`] type for documenation of the items yielded by this iterator. +/// See the [`Utf8Chunk`] type for documentation of the items yielded by this iterator. /// /// [byteslice]: slice /// [`from_utf8`]: super::from_utf8 diff --git a/library/core/tests/iter/adapters/take.rs b/library/core/tests/iter/adapters/take.rs index 65a8a93b4a916..b932059afec8a 100644 --- a/library/core/tests/iter/adapters/take.rs +++ b/library/core/tests/iter/adapters/take.rs @@ -255,7 +255,7 @@ fn test_reverse_on_zip() { let zipped_iter = vec_1.iter().zip(core::iter::repeat(0).take(20)); - // Cannot call rev here for automatic reversed zip constuction + // Cannot call rev here for automatic reversed zip construction for (&one, zero) in zipped_iter.rev() { assert_eq!((1, 0), (one, zero)); } diff --git a/src/tools/compiletest/src/read2.rs b/src/tools/compiletest/src/read2.rs index 62e675c77ae52..28ca5589992a2 100644 --- a/src/tools/compiletest/src/read2.rs +++ b/src/tools/compiletest/src/read2.rs @@ -90,7 +90,7 @@ impl ProcOutput { .count(); *filtered_len -= matches * path_bytes.len(); - // We can't just remove the length of the filtered path from the output lenght, + // We can't just remove the length of the filtered path from the output length, // otherwise a compiler emitting only filtered paths would OOM compiletest. Add // a fixed placeholder length for each path to prevent that. *filtered_len += matches * FILTERED_PATHS_PLACEHOLDER_LEN; diff --git a/tests/ui/traits/non_lifetime_binders/basic.rs b/tests/ui/traits/non_lifetime_binders/basic.rs index 7e45b76434a3b..533891bf830d2 100644 --- a/tests/ui/traits/non_lifetime_binders/basic.rs +++ b/tests/ui/traits/non_lifetime_binders/basic.rs @@ -1,5 +1,5 @@ //@ check-pass -// Basic test that show's we can succesfully typeck a `for` where clause. +// Basic test that show's we can successfully typeck a `for` where clause. #![feature(non_lifetime_binders)] //~^ WARN the feature `non_lifetime_binders` is incomplete