Remove by-mutable-ref mode from the compiler
and test cases. Closes #3513
This commit is contained in:
parent
05999290e2
commit
f96a2a2ca1
26 changed files with 59 additions and 95 deletions
|
@ -20,13 +20,13 @@ use obsolete::{
|
|||
ObsoleteLowerCaseKindBounds, ObsoleteLet,
|
||||
ObsoleteFieldTerminator, ObsoleteStructCtor,
|
||||
ObsoleteWith, ObsoleteClassMethod, ObsoleteClassTraits,
|
||||
ObsoleteModeInFnType
|
||||
ObsoleteModeInFnType, ObsoleteByMutRefMode
|
||||
};
|
||||
use ast::{_mod, add, alt_check, alt_exhaustive, arg, arm, attribute,
|
||||
bind_by_ref, bind_by_implicit_ref, bind_by_value, bind_by_move,
|
||||
bitand, bitor, bitxor, blk, blk_check_mode, bound_const,
|
||||
bound_copy, bound_send, bound_trait, bound_owned, box, by_copy,
|
||||
by_move, by_mutbl_ref, by_ref, by_val, capture_clause,
|
||||
by_move, by_ref, by_val, capture_clause,
|
||||
capture_item, cdir_dir_mod, cdir_src_mod, cdir_view_item,
|
||||
class_immutable, class_mutable,
|
||||
crate, crate_cfg, crate_directive, decl, decl_item, decl_local,
|
||||
|
@ -570,9 +570,10 @@ impl parser {
|
|||
|
||||
fn parse_arg_mode() -> mode {
|
||||
if self.eat(token::BINOP(token::AND)) {
|
||||
self.span_fatal(copy self.last_span,
|
||||
~"Obsolete syntax has no effect");
|
||||
expl(by_mutbl_ref)
|
||||
self.obsolete(copy self.span,
|
||||
ObsoleteByMutRefMode);
|
||||
// Bogus mode, but doesn't matter since it's an error
|
||||
expl(by_ref)
|
||||
} else if self.eat(token::BINOP(token::MINUS)) {
|
||||
expl(by_move)
|
||||
} else if self.eat(token::ANDAND) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue