@@ -14,7 +14,7 @@ use abi;
1414use ast:: BareFnTy ;
1515use ast:: { RegionTyParamBound , TraitTyParamBound , TraitBoundModifier } ;
1616use ast:: { Public , Unsafety } ;
17- use ast:: { Mod , BiAdd , Arg , Arm , Attribute , BindByRef , BindByValue } ;
17+ use ast:: { Mod , BiAdd , Arg , Arm , Attribute , BindingMode } ;
1818use ast:: { BiBitAnd , BiBitOr , BiBitXor , BiRem , BiLt , Block } ;
1919use ast:: { BlockCheckMode , CaptureByRef , CaptureByValue , CaptureClause } ;
2020use ast:: { Constness , ConstTraitItem , Crate , CrateConfig } ;
@@ -3274,10 +3274,10 @@ impl<'a> Parser<'a> {
32743274 hi = self . last_span . hi ;
32753275
32763276 let bind_type = match ( is_ref, is_mut) {
3277- ( true , true ) => BindByRef ( MutMutable ) ,
3278- ( true , false ) => BindByRef ( MutImmutable ) ,
3279- ( false , true ) => BindByValue ( MutMutable ) ,
3280- ( false , false ) => BindByValue ( MutImmutable ) ,
3277+ ( true , true ) => BindingMode :: ByRef ( MutMutable ) ,
3278+ ( true , false ) => BindingMode :: ByRef ( MutImmutable ) ,
3279+ ( false , true ) => BindingMode :: ByValue ( MutMutable ) ,
3280+ ( false , false ) => BindingMode :: ByValue ( MutImmutable ) ,
32813281 } ;
32823282 let fieldpath = codemap:: Spanned { span : self . last_span , node : fieldname} ;
32833283 let fieldpat = P ( ast:: Pat {
@@ -3372,11 +3372,11 @@ impl<'a> Parser<'a> {
33723372 // At this point, token != _, &, &&, (, [
33733373 if try!( self . eat_keyword ( keywords:: Mut ) ) {
33743374 // Parse mut ident @ pat
3375- pat = try!( self . parse_pat_ident ( BindByValue ( MutMutable ) ) ) ;
3375+ pat = try!( self . parse_pat_ident ( BindingMode :: ByValue ( MutMutable ) ) ) ;
33763376 } else if try!( self . eat_keyword ( keywords:: Ref ) ) {
33773377 // Parse ref ident @ pat / ref mut ident @ pat
33783378 let mutbl = try!( self . parse_mutability ( ) ) ;
3379- pat = try!( self . parse_pat_ident ( BindByRef ( mutbl) ) ) ;
3379+ pat = try!( self . parse_pat_ident ( BindingMode :: ByRef ( mutbl) ) ) ;
33803380 } else if try!( self . eat_keyword ( keywords:: Box ) ) {
33813381 // Parse box pat
33823382 let subpat = try!( self . parse_pat ( ) ) ;
@@ -3405,7 +3405,7 @@ impl<'a> Parser<'a> {
34053405 // Parse ident @ pat
34063406 // This can give false positives and parse nullary enums,
34073407 // they are dealt with later in resolve
3408- pat = try!( self . parse_pat_ident ( BindByValue ( MutImmutable ) ) ) ;
3408+ pat = try!( self . parse_pat_ident ( BindingMode :: ByValue ( MutImmutable ) ) ) ;
34093409 }
34103410 } else {
34113411 let ( qself, path) = if try!( self . eat_lt ( ) ) {
0 commit comments