about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorTechVest <techdashen@qq.com>2024-04-17 15:05:56 +0800
committerTechVest <techdashen@qq.com>2024-04-25 10:47:24 +0800
commit45df09b7deaeda5a816d9e447e5cca7b928b60c6 (patch)
tree66d00edc7770527432ebea4cd021be4a6338cee3 /src
parentb7581490aaf964d4a34121d75be0fc49a2445911 (diff)
Fix some typos in comments
Signed-off-by: TechVest <techdashen@qq.com>
Diffstat (limited to 'src')
-rw-r--r--src/bootstrap/src/core/build_steps/compile.rs2
-rw-r--r--src/doc/rustdoc/src/lints.md2
-rw-r--r--src/librustdoc/lint.rs2
-rw-r--r--src/librustdoc/passes/collect_intra_doc_links.rs2
-rw-r--r--src/rustdoc-json-types/lib.rs2
5 files changed, 5 insertions, 5 deletions
diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs
index 9420e40d6c2..93feb1d4daa 100644
--- a/src/bootstrap/src/core/build_steps/compile.rs
+++ b/src/bootstrap/src/core/build_steps/compile.rs
@@ -43,7 +43,7 @@ pub struct Std {
     /// This shouldn't be used from other steps; see the comment on [`Rustc`].
     crates: Vec<String>,
     /// When using download-rustc, we need to use a new build of `std` for running unit tests of Std itself,
-    /// but we need to use the downloaded copy of std for linking to rustdoc. Allow this to be overriden by `builder.ensure` from other steps.
+    /// but we need to use the downloaded copy of std for linking to rustdoc. Allow this to be overridden by `builder.ensure` from other steps.
     force_recompile: bool,
     extra_rust_args: &'static [&'static str],
     is_for_mir_opt_tests: bool,
diff --git a/src/doc/rustdoc/src/lints.md b/src/doc/rustdoc/src/lints.md
index 7d573ac950d..c05077befdb 100644
--- a/src/doc/rustdoc/src/lints.md
+++ b/src/doc/rustdoc/src/lints.md
@@ -417,7 +417,7 @@ warning: 1 warning emitted
 
 This lint is **warn-by-default**. It detects explicit links that are the same
 as computed automatic links.
-This usually means the explicit links are removeable. For example:
+This usually means the explicit links are removable. For example:
 
 ```rust
 #![warn(rustdoc::redundant_explicit_links)] // note: unnecessary - warns by default.
diff --git a/src/librustdoc/lint.rs b/src/librustdoc/lint.rs
index f78743a7917..dd2bb47e592 100644
--- a/src/librustdoc/lint.rs
+++ b/src/librustdoc/lint.rs
@@ -187,7 +187,7 @@ declare_rustdoc_lint! {
 
 declare_rustdoc_lint! {
     /// This lint is **warn-by-default**. It detects explicit links that are the same
-    /// as computed automatic links. This usually means the explicit links are removeable.
+    /// as computed automatic links. This usually means the explicit links are removable.
     /// This is a `rustdoc` only lint, see the documentation in the [rustdoc book].
     ///
     /// [rustdoc book]: ../../../rustdoc/lints.html#redundant_explicit_links
diff --git a/src/librustdoc/passes/collect_intra_doc_links.rs b/src/librustdoc/passes/collect_intra_doc_links.rs
index 1ba4e6cbdf0..747f5c0a835 100644
--- a/src/librustdoc/passes/collect_intra_doc_links.rs
+++ b/src/librustdoc/passes/collect_intra_doc_links.rs
@@ -1420,7 +1420,7 @@ impl LinkCollector<'_, '_> {
         //
         // Otherwise, check if 2 links are same, if so, skip the resolve process.
         //
-        // Notice that this algorithm is passive, might possibly miss actual redudant cases.
+        // Notice that this algorithm is passive, might possibly miss actual redundant cases.
         let explicit_link = explicit_link.to_string();
         let display_text = ori_link.display_text.as_ref().unwrap();
 
diff --git a/src/rustdoc-json-types/lib.rs b/src/rustdoc-json-types/lib.rs
index 89d6f8d67f1..e788069ea80 100644
--- a/src/rustdoc-json-types/lib.rs
+++ b/src/rustdoc-json-types/lib.rs
@@ -314,7 +314,7 @@ pub enum StructKind {
     /// All [`Id`]'s will point to [`ItemEnum::StructField`]. Private and
     /// `#[doc(hidden)]` fields will be given as `None`
     Tuple(Vec<Option<Id>>),
-    /// A struct with nammed fields.
+    /// A struct with named fields.
     ///
     /// ```rust
     /// pub struct PlainStruct { x: i32 }