diff options
| author | Tim Chevalier <chevalier@alum.wellesley.edu> | 2012-01-18 22:37:22 -0800 |
|---|---|---|
| committer | Tim Chevalier <chevalier@alum.wellesley.edu> | 2012-01-18 23:17:34 -0800 |
| commit | 04a2887f8791bb080b4e76a55949a7c1954dbb97 (patch) | |
| tree | f072b2cc1e0b41270041a3a10a4fc313d3fa1a89 /src/comp/middle/capture.rs | |
| parent | ca7cfbe3d0251766217e5d4e559903e655e7549b (diff) | |
Remove '.' after nullary tags in patterns
Does what it says on the tin. The next commit will remove support for this syntax.
Diffstat (limited to 'src/comp/middle/capture.rs')
| -rw-r--r-- | src/comp/middle/capture.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/comp/middle/capture.rs b/src/comp/middle/capture.rs index b9e9a02c0f0..9fb600d41c7 100644 --- a/src/comp/middle/capture.rs +++ b/src/comp/middle/capture.rs @@ -75,11 +75,11 @@ fn check_capture_clause(tcx: ty::ctxt, }; alt fn_proto { - ast::proto_any. | ast::proto_block. { + ast::proto_any | ast::proto_block { check_block_captures(cap_clause.copies); check_block_captures(cap_clause.moves); } - ast::proto_bare. | ast::proto_box. | ast::proto_uniq. { + ast::proto_bare | ast::proto_box | ast::proto_uniq { vec::iter(cap_clause.copies, check_capture_item); vec::iter(cap_clause.moves, check_capture_item); vec::iter(cap_clause.moves, check_not_upvar); @@ -113,15 +113,15 @@ fn compute_capture_vars(tcx: ty::ctxt, } let implicit_mode = alt fn_proto { - ast::proto_any. | ast::proto_block. { cap_ref } - ast::proto_bare. | ast::proto_box. | ast::proto_uniq. { cap_copy } + ast::proto_any | ast::proto_block { cap_ref } + ast::proto_bare | ast::proto_box | ast::proto_uniq { cap_copy } }; vec::iter(*freevars) { |fvar| let fvar_def_id = ast_util::def_id_of_def(fvar.def).node; alt cap_map.find(fvar_def_id) { option::some(_) { /* was explicitly named, do nothing */ } - option::none. { + option::none { cap_map.insert(fvar_def_id, {def:fvar.def, mode:implicit_mode}); } } |
