Fix typo: [upv.rs_mentioned] -> [upvars_mentioned]

This commit is contained in:
chubei 2021-11-07 20:31:08 +08:00 committed by Joshua Nelson
parent 42e31a049e
commit 7335f28334
1 changed files with 1 additions and 1 deletions

View File

@ -115,7 +115,7 @@ 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, *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 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. the *free variables* meaning they are not bound to the context of the closure.
[`compiler/rustc_middle/src/ty/query/mod.rs`][upvars] defines a query called *upv.rs_mentioned* [`compiler/rustc_middle/src/ty/query/mod.rs`][upvars] defines a query called *upvars_mentioned*
for this purpose. for this purpose.
[upvars]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_query_impl/queries/struct.upvars_mentioned.html [upvars]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_query_impl/queries/struct.upvars_mentioned.html