diff options
| author | Yuki Okushi <huyuumi.dev@gmail.com> | 2020-05-27 00:21:56 +0900 |
|---|---|---|
| committer | Who? Me?! <mark-i-m@users.noreply.github.com> | 2020-05-26 11:05:21 -0500 |
| commit | e08f5d7f95be6e3b7ab46ce0d0a20def0c964e59 (patch) | |
| tree | 240a11203d6fc3523673049717da05039a4610c9 /src/doc/rustc-dev-guide | |
| parent | 124eaa06ccb005561c3a125d75ff00773f223746 (diff) | |
| download | rust-e08f5d7f95be6e3b7ab46ce0d0a20def0c964e59.tar.gz rust-e08f5d7f95be6e3b7ab46ce0d0a20def0c964e59.zip | |
Rename `upvars` query to `upvars_mentioned`
Diffstat (limited to 'src/doc/rustc-dev-guide')
| -rw-r--r-- | src/doc/rustc-dev-guide/src/closure.md | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/doc/rustc-dev-guide/src/closure.md b/src/doc/rustc-dev-guide/src/closure.md index d4f9fc3852b..0f9b1396535 100644 --- a/src/doc/rustc-dev-guide/src/closure.md +++ b/src/doc/rustc-dev-guide/src/closure.md @@ -115,9 +115,10 @@ Let's start with defining a term that we will be using quite a bit in the rest o *upvar*. An **upvar** is a variable that is local to the function where the closure is defined. So, in the above examples, **x** will be an upvar to the closure. They are also sometimes referred to as the *free variables* meaning they are not bound to the context of the closure. -[`src/librustc_middle/ty/query/mod.rs`][upvars] defines a query called *upvars* for this purpose. +[`src/librustc_middle/ty/query/mod.rs`][upvars] defines a query called *upvars_mentioned* +for this purpose. -[upvars]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/query/queries/struct.upvars.html +[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 normal function is that it can use the upvars. It borrows these upvars from its surrounding |
