From e16dbb7888504ef5d0de0c14493fc8ecc492ee30 Mon Sep 17 00:00:00 2001 From: Tim Chevalier Date: Fri, 5 Oct 2012 14:58:42 -0700 Subject: Demode some code using by-mutbl-ref; warn about by-mutbl-ref The parser now warns about use of mutbl-ref mode, though it's kind of a lie since this commit doesn't remove support for the mode. Changed move_val_init to have stage0 and stage1/2 versions, the latter of which is demoded. Changed the type that the typechecker expects the move_val_init intrinsic to have. After this is pushed, I can make a new snapshot, which will remove the need for the stage0 versions. --- src/libsyntax/parse/parser.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/libsyntax/parse/parser.rs') diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 8860d1b5cea..1a87d7fed69 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -570,6 +570,7 @@ impl parser { fn parse_arg_mode() -> mode { if self.eat(token::BINOP(token::AND)) { + self.warn(~"Obsolete syntax has no effect"); expl(by_mutbl_ref) } else if self.eat(token::BINOP(token::MINUS)) { expl(by_move) -- cgit 1.4.1-3-g733a5