@@ -5,7 +5,7 @@ effectively "desugared" into structs that contain the values they use (or
55references to the values they use) from their creator's stack frame. rustc has
66the job of figuring out which values a closure uses and how, so it can decide
77whether 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
1010implementing.
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
124124normal function is that it can use the upvars. It borrows these upvars from its surrounding
125125context; therefore the compiler has to determine the upvar's borrow type. The compiler starts with
126126assigning 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
195195All of these callbacks have a common argument * cmt* which stands for Category,
0 commit comments