about summary refs log tree commit diff
path: root/src/doc/rustc-dev-guide
diff options
context:
space:
mode:
authorYoungsuk_Kim <ykim837@gatech.edu>2020-09-25 17:23:37 -0400
committerJoshua Nelson <joshua@yottadb.com>2020-09-25 22:55:49 -0400
commit268028e25928e9fb31271f360b66dc6aae61ee42 (patch)
treea6f80b38149010b7db28d4514e1ea4da557b028a /src/doc/rustc-dev-guide
parent370b79975ced84fe1c17eee2632df9a2ac8a9651 (diff)
downloadrust-268028e25928e9fb31271f360b66dc6aae61ee42.tar.gz
rust-268028e25928e9fb31271f360b66dc6aae61ee42.zip
minor punctuation/grammar error fix
Diffstat (limited to 'src/doc/rustc-dev-guide')
-rw-r--r--src/doc/rustc-dev-guide/src/closure.md6
-rw-r--r--src/doc/rustc-dev-guide/src/compiler-src.md2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/doc/rustc-dev-guide/src/closure.md b/src/doc/rustc-dev-guide/src/closure.md
index 3a7a10f5c87..665f7734eef 100644
--- a/src/doc/rustc-dev-guide/src/closure.md
+++ b/src/doc/rustc-dev-guide/src/closure.md
@@ -5,7 +5,7 @@ effectively "desugared" into structs that contain the values they use (or
 references to the values they use) from their creator's stack frame. rustc has
 the job of figuring out which values a closure uses and how, so it can decide
 whether to capture a given variable by shared reference, mutable reference, or
-by move. rustc also has to figure out which the closure traits ([`Fn`][fn],
+by move. rustc also has to figure out which of the closure traits ([`Fn`][fn],
 [`FnMut`][fn_mut], or [`FnOnce`][fn_once]) a closure is capable of
 implementing.
 
@@ -120,7 +120,7 @@ for this purpose.
 
 [upvars]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/query/queries/struct.upvars_mentioned.html
 
-Other than lazy invocation, one other thing that the distinguishes a closure from a
+Other than lazy invocation, one other thing that distinguishes a closure from a
 normal function is that it can use the upvars. It borrows these upvars from its surrounding
 context; therefore the compiler has to determine the upvar's borrow type. The compiler starts with
 assigning an immutable borrow type and lowers the restriction (that is, changes it from
@@ -189,7 +189,7 @@ can be `ByValue` (moved) or `ByRef` (borrowed). For `ByRef` borrows, it can be
 [mir_mod]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/mir/index.html
 
 `Delegate` defines a few different methods (the different callbacks):
-**consume**: for *move* of a variable, **borrow** for a *borrow* of some kind
+**consume** for *move* of a variable, **borrow** for a *borrow* of some kind
 (shared or mutable), and **mutate** when we see an *assignment* of something.
 
 All of these callbacks have a common argument *cmt* which stands for Category,
diff --git a/src/doc/rustc-dev-guide/src/compiler-src.md b/src/doc/rustc-dev-guide/src/compiler-src.md
index 843000a0731..5183a7c85b8 100644
--- a/src/doc/rustc-dev-guide/src/compiler-src.md
+++ b/src/doc/rustc-dev-guide/src/compiler-src.md
@@ -78,7 +78,7 @@ something like this:
 You can see the exact dependencies by reading the `Cargo.toml` for the various
 crates, just like a normal Rust crate.
 
-One final thing: [`src/llvm-project`] is a submodule for our fork of LLVM
+One final thing: [`src/llvm-project`] is a submodule for our fork of LLVM.
 During bootstrapping, LLVM is built and the [`src/librustc_llvm`] and
 [`src/rustllvm`] crates contain rust wrappers around LLVM (which is written in
 C++), so that the compiler can interface with it.