1
Fork 0

Add some code comments

This commit is contained in:
Santiago Pastorino 2025-03-06 16:57:51 -03:00
parent a68db7e3a8
commit 42b8b13b22
No known key found for this signature in database
GPG key ID: 8131A24E0C79EFAF
2 changed files with 11 additions and 1 deletions

View file

@ -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,