Skip to content

Commit 0adf8a3

Browse files
JOE1994Joshua Nelson
authored and
Joshua Nelson
committed
minor punctuation/grammar error fix
1 parent d35a4c4 commit 0adf8a3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/closure.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ effectively "desugared" into structs that contain the values they use (or
55
references to the values they use) from their creator's stack frame. rustc has
66
the job of figuring out which values a closure uses and how, so it can decide
77
whether to capture a given variable by shared reference, mutable reference, or
8-
by move. rustc also has to figure out which the closure traits ([`Fn`][fn],
8+
by move. rustc also has to figure out which of the closure traits ([`Fn`][fn],
99
[`FnMut`][fn_mut], or [`FnOnce`][fn_once]) a closure is capable of
1010
implementing.
1111

@@ -120,7 +120,7 @@ for this purpose.
120120

121121
[upvars]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/query/queries/struct.upvars_mentioned.html
122122

123-
Other than lazy invocation, one other thing that the distinguishes a closure from a
123+
Other than lazy invocation, one other thing that distinguishes a closure from a
124124
normal function is that it can use the upvars. It borrows these upvars from its surrounding
125125
context; therefore the compiler has to determine the upvar's borrow type. The compiler starts with
126126
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
189189
[mir_mod]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/mir/index.html
190190

191191
`Delegate` defines a few different methods (the different callbacks):
192-
**consume**: for *move* of a variable, **borrow** for a *borrow* of some kind
192+
**consume** for *move* of a variable, **borrow** for a *borrow* of some kind
193193
(shared or mutable), and **mutate** when we see an *assignment* of something.
194194

195195
All of these callbacks have a common argument *cmt* which stands for Category,

src/compiler-src.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ something like this:
7878
You can see the exact dependencies by reading the `Cargo.toml` for the various
7979
crates, just like a normal Rust crate.
8080

81-
One final thing: [`src/llvm-project`] is a submodule for our fork of LLVM
81+
One final thing: [`src/llvm-project`] is a submodule for our fork of LLVM.
8282
During bootstrapping, LLVM is built and the [`src/librustc_llvm`] and
8383
[`src/rustllvm`] crates contain rust wrappers around LLVM (which is written in
8484
C++), so that the compiler can interface with it.

0 commit comments

Comments
 (0)