@@ -20,13 +20,13 @@ use obsolete::{
2020 ObsoleteLowerCaseKindBounds , ObsoleteLet ,
2121 ObsoleteFieldTerminator , ObsoleteStructCtor ,
2222 ObsoleteWith , ObsoleteClassMethod , ObsoleteClassTraits ,
23- ObsoleteModeInFnType
23+ ObsoleteModeInFnType , ObsoleteByMutRefMode
2424} ;
2525use ast:: { _mod, add, alt_check, alt_exhaustive, arg, arm, attribute,
2626 bind_by_ref, bind_by_implicit_ref, bind_by_value, bind_by_move,
2727 bitand, bitor, bitxor, blk, blk_check_mode, bound_const,
2828 bound_copy, bound_send, bound_trait, bound_owned, box, by_copy,
29- by_move, by_mutbl_ref , by_ref, by_val, capture_clause,
29+ by_move, by_ref, by_val, capture_clause,
3030 capture_item, cdir_dir_mod, cdir_src_mod, cdir_view_item,
3131 class_immutable, class_mutable,
3232 crate , crate_cfg, crate_directive, decl, decl_item, decl_local,
@@ -570,9 +570,10 @@ impl parser {
570570
571571 fn parse_arg_mode ( ) -> mode {
572572 if self . eat ( token:: BINOP ( token:: AND ) ) {
573- self . span_fatal ( copy self . last_span ,
574- ~"Obsolete syntax has no effect") ;
575- expl ( by_mutbl_ref)
573+ self . obsolete ( copy self . span ,
574+ ObsoleteByMutRefMode ) ;
575+ // Bogus mode, but doesn't matter since it's an error
576+ expl ( by_ref)
576577 } else if self . eat ( token:: BINOP ( token:: MINUS ) ) {
577578 expl ( by_move)
578579 } else if self . eat ( token:: ANDAND ) {
0 commit comments