about summary refs log tree commit diff
path: root/src/doc/rustc-dev-guide
diff options
context:
space:
mode:
authorneedsure <qinzhipeng@outlook.com>2024-04-09 16:53:13 +0800
committerTshepang Mbambo <tshepang@gmail.com>2024-04-09 10:59:59 +0200
commitaf302d2fb724ad67302ca2ba22ae34c0d65ebfb5 (patch)
treefeca10b150e8f7a2567598330a8e7dd2a62634e1 /src/doc/rustc-dev-guide
parentc1e473533a02f8ce12b5b782c31ee854429c5251 (diff)
downloadrust-af302d2fb724ad67302ca2ba22ae34c0d65ebfb5.tar.gz
rust-af302d2fb724ad67302ca2ba22ae34c0d65ebfb5.zip
chore: fix some typos in conments
Signed-off-by: needsure <qinzhipeng@outlook.com>
Diffstat (limited to 'src/doc/rustc-dev-guide')
-rw-r--r--src/doc/rustc-dev-guide/src/implementing_new_features.md2
-rw-r--r--src/doc/rustc-dev-guide/src/thir.md4
-rw-r--r--src/doc/rustc-dev-guide/src/turbofishing-and-early-late-bound.md2
-rw-r--r--src/doc/rustc-dev-guide/src/what-does-early-late-bound-mean.md6
4 files changed, 7 insertions, 7 deletions
diff --git a/src/doc/rustc-dev-guide/src/implementing_new_features.md b/src/doc/rustc-dev-guide/src/implementing_new_features.md
index 1b9170e49cb..d87afeaedce 100644
--- a/src/doc/rustc-dev-guide/src/implementing_new_features.md
+++ b/src/doc/rustc-dev-guide/src/implementing_new_features.md
@@ -123,7 +123,7 @@ a new unstable feature:
 
 1. Add the feature name to `rustc_span/src/symbol.rs` in the `Symbols {...}` block.
 
-   Note that this block must be in alphbetical order.
+   Note that this block must be in alphabetical order.
 
 1. Add a feature gate declaration to `rustc_feature/src/unstable.rs` in the unstable
    `declare_features` block.
diff --git a/src/doc/rustc-dev-guide/src/thir.md b/src/doc/rustc-dev-guide/src/thir.md
index 9c49cb10bc4..2057028cd0b 100644
--- a/src/doc/rustc-dev-guide/src/thir.md
+++ b/src/doc/rustc-dev-guide/src/thir.md
@@ -144,12 +144,12 @@ Thir {
             span: oneplustwo.rs:2:13: 2:18 (#0),
             kind: Binary {
                 op: Add,
-                // references to scopes surronding literals above
+                // references to scopes surrounding literals above
                 lhs: e1,
                 rhs: e3,
             },
         },
-        // expression 5, scope surronding expression 4
+        // expression 5, scope surrounding expression 4
         Expr {
             ty: i32,
             temp_lifetime: Some(
diff --git a/src/doc/rustc-dev-guide/src/turbofishing-and-early-late-bound.md b/src/doc/rustc-dev-guide/src/turbofishing-and-early-late-bound.md
index 7de01ad6359..648f28079c8 100644
--- a/src/doc/rustc-dev-guide/src/turbofishing-and-early-late-bound.md
+++ b/src/doc/rustc-dev-guide/src/turbofishing-and-early-late-bound.md
@@ -91,7 +91,7 @@ fn accepts_fn_2(_: impl Fn(&'static ()) -> &'static ()) {}
 fn main() {
     let f = late::<'static>;
     
-    accepts_fn(f); //~ error: `f` doesnt implement `for<'a> Fn(&'a ()) -> &'a ()`
+    accepts_fn(f); //~ error: `f` doesn't implement `for<'a> Fn(&'a ()) -> &'a ()`
     accepts_fn_2(f) // works
     
     accepts_fn(late) // works
diff --git a/src/doc/rustc-dev-guide/src/what-does-early-late-bound-mean.md b/src/doc/rustc-dev-guide/src/what-does-early-late-bound-mean.md
index cde9074fe41..ced07200a26 100644
--- a/src/doc/rustc-dev-guide/src/what-does-early-late-bound-mean.md
+++ b/src/doc/rustc-dev-guide/src/what-does-early-late-bound-mean.md
@@ -47,7 +47,7 @@ fn foo_late<'a, T>(_: &'a u32, _: T) {}
 fn accepts_hr_func<F: for<'a> Fn(&'a u32, u32)>(_: F) {}
 
 fn main() {
-    // doesnt work, the substituted bound is `for<'a> FnDef<'?0>: Fn(&'a u32, u32)`
+    // doesn't work, the substituted bound is `for<'a> FnDef<'?0>: Fn(&'a u32, u32)`
     // `foo_early` only implements `for<'a> FnDef<'a>: Fn(&'a u32, u32)`- the lifetime
     // of the borrow in the function argument must be the same as the lifetime
     // on the `FnDef`.
@@ -116,11 +116,11 @@ fn foo3<'a, T: 'a>(_: &'a T) {}
 fn foo4<'a, 'b: 'a>(_: Inv<&'a ()>, _: Inv<&'b ()>) {}
 //      ^^  ^^         ^^^ note:
 //      ^^  ^^         `Inv` stands for `Invariant` and is used to
-//      ^^  ^^          make the the type parameter invariant. This
+//      ^^  ^^          make the type parameter invariant. This
 //      ^^  ^^          is necessary for demonstration purposes as
 //      ^^  ^^          `for<'a, 'b> fn(&'a (), &'b ())` and
 //      ^^  ^^          `for<'a> fn(&'a u32, &'a u32)` are subtypes-
-//      ^^  ^^          of eachother which makes the bound trivially
+//      ^^  ^^          of each other which makes the bound trivially
 //      ^^  ^^          satisfiable when making the fnptr. `Inv`
 //      ^^  ^^          disables this subtyping.
 //      ^^  ^^