From 98fdcb0b9d8b66a5feef1e45c06aeec93919d254 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Fri, 7 Dec 2012 19:34:57 -0800 Subject: librustc: De-mode pattern bindings. r=nmatsakis --- src/libsyntax/parse/parser.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/libsyntax/parse') diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 8e354f7017d..1bd3f970573 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -23,7 +23,7 @@ use obsolete::{ ObsoleteModeInFnType, ObsoleteMoveInit, ObsoleteBinaryMove, }; use ast::{_mod, add, arg, arm, attribute, - bind_by_ref, bind_by_implicit_ref, bind_by_value, bind_by_move, + bind_by_ref, bind_infer, bind_by_value, bind_by_move, bitand, bitor, bitxor, blk, blk_check_mode, box, by_copy, by_move, by_ref, by_val, capture_clause, capture_item, class_immutable, class_mutable, @@ -1925,9 +1925,7 @@ impl Parser { } else { subpat = @{ id: self.get_id(), - node: pat_ident(bind_by_implicit_ref, - fieldpath, - None), + node: pat_ident(bind_infer, fieldpath, None), span: self.last_span }; } @@ -2054,9 +2052,7 @@ impl Parser { } else if self.eat_keyword(~"move") { binding_mode = bind_by_move; } else if refutable { - // XXX: Should be bind_by_value, but that's not - // backward compatible. - binding_mode = bind_by_implicit_ref; + binding_mode = bind_infer; } else { binding_mode = bind_by_value; } -- cgit 1.4.1-3-g733a5