diff options
| author | Tim Chevalier <chevalier@alum.wellesley.edu> | 2012-10-05 14:58:42 -0700 |
|---|---|---|
| committer | Tim Chevalier <chevalier@alum.wellesley.edu> | 2012-10-05 15:37:01 -0700 |
| commit | e16dbb7888504ef5d0de0c14493fc8ecc492ee30 (patch) | |
| tree | 80c1bde3c3f3b0cf47993dfe769418cc2ac55323 /src/libsyntax/parse | |
| parent | e3cb70fa8a6f9163352f26ae2614ab4c9a261838 (diff) | |
| download | rust-e16dbb7888504ef5d0de0c14493fc8ecc492ee30.tar.gz rust-e16dbb7888504ef5d0de0c14493fc8ecc492ee30.zip | |
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.
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 1 |
1 files changed, 1 insertions, 0 deletions
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) |
