From 824d75c22e6a95058c488d4f0d6048277ba91f9d Mon Sep 17 00:00:00 2001 From: cui fliter Date: Fri, 23 Feb 2024 18:26:01 +0800 Subject: [PATCH] remove repetitive words Signed-off-by: cui fliter --- compiler/rustc_codegen_ssa/src/back/metadata.rs | 2 +- compiler/rustc_middle/src/traits/select.rs | 2 +- library/alloc/src/collections/btree/map.rs | 12 ++++++------ src/bootstrap/src/core/config/config.rs | 2 +- .../write-documentation/linking-to-items-by-name.md | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/compiler/rustc_codegen_ssa/src/back/metadata.rs b/compiler/rustc_codegen_ssa/src/back/metadata.rs index 8e76e47cfefca..c6b04431fab10 100644 --- a/compiler/rustc_codegen_ssa/src/back/metadata.rs +++ b/compiler/rustc_codegen_ssa/src/back/metadata.rs @@ -623,7 +623,7 @@ pub fn create_compressed_metadata_file_for_xcoff( /// that contains a custom section of the name `section_name` with contents /// `data`. /// -/// NB: the `object` crate does not yet have support for writing the the wasm +/// NB: the `object` crate does not yet have support for writing the wasm /// object file format. The format is simple enough that for now an extra crate /// from crates.io (such as `wasm-encoder`). The file format is: /// diff --git a/compiler/rustc_middle/src/traits/select.rs b/compiler/rustc_middle/src/traits/select.rs index e3050007c7b3c..8e9751f45294c 100644 --- a/compiler/rustc_middle/src/traits/select.rs +++ b/compiler/rustc_middle/src/traits/select.rs @@ -139,7 +139,7 @@ pub enum SelectionCandidate<'tcx> { /// generated for an `async ||` expression. AsyncClosureCandidate, - /// Implementation of the the `AsyncFnKindHelper` helper trait, which + /// Implementation of the `AsyncFnKindHelper` helper trait, which /// is used internally to delay computation for async closures until after /// upvar analysis is performed in HIR typeck. AsyncFnKindHelperCandidate, diff --git a/library/alloc/src/collections/btree/map.rs b/library/alloc/src/collections/btree/map.rs index 80be4ee57c5c0..271ea88fff652 100644 --- a/library/alloc/src/collections/btree/map.rs +++ b/library/alloc/src/collections/btree/map.rs @@ -2916,7 +2916,7 @@ impl<'a, K, V> Cursor<'a, K, V> { } } - /// Returns a reference to the the key and value of the next element without + /// Returns a reference to the key and value of the next element without /// moving the cursor. /// /// If the cursor is at the end of the map then `None` is returned @@ -2925,7 +2925,7 @@ impl<'a, K, V> Cursor<'a, K, V> { self.clone().next() } - /// Returns a reference to the the key and value of the previous element + /// Returns a reference to the key and value of the previous element /// without moving the cursor. /// /// If the cursor is at the start of the map then `None` is returned. @@ -2958,7 +2958,7 @@ impl<'a, K, V, A> CursorMut<'a, K, V, A> { Some((&*k, v)) } - /// Returns a reference to the the key and value of the next element without + /// Returns a reference to the key and value of the next element without /// moving the cursor. /// /// If the cursor is at the end of the map then `None` is returned @@ -2968,7 +2968,7 @@ impl<'a, K, V, A> CursorMut<'a, K, V, A> { Some((&*k, v)) } - /// Returns a reference to the the key and value of the previous element + /// Returns a reference to the key and value of the previous element /// without moving the cursor. /// /// If the cursor is at the start of the map then `None` is returned. @@ -3056,7 +3056,7 @@ impl<'a, K, V, A> CursorMutKey<'a, K, V, A> { } } - /// Returns a reference to the the key and value of the next element without + /// Returns a reference to the key and value of the next element without /// moving the cursor. /// /// If the cursor is at the end of the map then `None` is returned @@ -3068,7 +3068,7 @@ impl<'a, K, V, A> CursorMutKey<'a, K, V, A> { Some(kv) } - /// Returns a reference to the the key and value of the previous element + /// Returns a reference to the key and value of the previous element /// without moving the cursor. /// /// If the cursor is at the start of the map then `None` is returned. diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs index 66592fe7e1010..834025c81887e 100644 --- a/src/bootstrap/src/core/config/config.rs +++ b/src/bootstrap/src/core/config/config.rs @@ -2399,7 +2399,7 @@ impl Config { .last_modified_commit(&["src/llvm-project"], "download-ci-llvm", true) .is_none() { - // there are some untracked changes in the the given paths. + // there are some untracked changes in the given paths. false } else { llvm::is_ci_llvm_available(self, asserts) diff --git a/src/doc/rustdoc/src/write-documentation/linking-to-items-by-name.md b/src/doc/rustdoc/src/write-documentation/linking-to-items-by-name.md index f7a749744e0fe..56c14b1638a6f 100644 --- a/src/doc/rustdoc/src/write-documentation/linking-to-items-by-name.md +++ b/src/doc/rustdoc/src/write-documentation/linking-to-items-by-name.md @@ -167,5 +167,5 @@ render differently in this case: [f]: g ``` -`1.` and `2.` will will be displayed as is in the rendered documentation (ie, `[a]` and `[b][c]`) +`1.` and `2.` will be displayed as is in the rendered documentation (ie, `[a]` and `[b][c]`) whereas `3.` and `4.` will be replaced by a link targetting `e` for `[d](e)` and `g` for `[f]`.