Skip to content

Commit f53fc66

Browse files
JohnTitormark-i-m
authored andcommitted
Rename upvars query to upvars_mentioned
1 parent c2561c4 commit f53fc66

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/closure.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,10 @@ Let's start with defining a term that we will be using quite a bit in the rest o
115115
*upvar*. An **upvar** is a variable that is local to the function where the closure is defined. So,
116116
in the above examples, **x** will be an upvar to the closure. They are also sometimes referred to as
117117
the *free variables* meaning they are not bound to the context of the closure.
118-
[`src/librustc_middle/ty/query/mod.rs`][upvars] defines a query called *upvars* for this purpose.
118+
[`src/librustc_middle/ty/query/mod.rs`][upvars] defines a query called *upvars_mentioned*
119+
for this purpose.
119120

120-
[upvars]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/query/queries/struct.upvars.html
121+
[upvars]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/query/queries/struct.upvars_mentioned.html
121122

122123
Other than lazy invocation, one other thing that the distinguishes a closure from a
123124
normal function is that it can use the upvars. It borrows these upvars from its surrounding

0 commit comments

Comments
 (0)