Add some code comments
This commit is contained in:
parent
a68db7e3a8
commit
42b8b13b22
2 changed files with 11 additions and 1 deletions
|
@ -1760,9 +1760,13 @@ pub enum CaptureBy {
|
|||
/// The span of the `move` keyword.
|
||||
move_kw: Span,
|
||||
},
|
||||
/// `move` keyword was not specified.
|
||||
/// `move` or `use` keywords were not specified.
|
||||
Ref,
|
||||
/// `use |x| y + x`.
|
||||
///
|
||||
/// Note that if you have a regular closure like `|| x.use`, this will *not* result
|
||||
/// in a `Use` capture. Instead, the `ExprUseVisitor` will look at the type
|
||||
/// of `x` and treat `x.use` as either a copy/clone/move as appropriate.
|
||||
Use {
|
||||
/// The span of the `use` keyword.
|
||||
use_kw: Span,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue