implement capture clauses (move, in particular) and integrate

them into type state and so forth
This commit is contained in:
Niko Matsakis 2011-12-19 12:50:31 -08:00
parent 41ae146057
commit 55a2fd18ec
14 changed files with 305 additions and 53 deletions

View file

@ -261,6 +261,10 @@ tag expr_ {
expr_mac(mac);
}
// AST nodes that represent a capture clause, which is used to declare
// variables that are copied or moved explicitly into the closure. In some
// cases, local variables can also be copied implicitly into the closure if
// they are used in the closure body.
type capture_item = {
id: int,
name: ident, // Currently, can only capture a local var.