@@ -14,7 +14,7 @@ use abi;
14
14
use ast:: BareFnTy ;
15
15
use ast:: { RegionTyParamBound , TraitTyParamBound , TraitBoundModifier } ;
16
16
use ast:: { Public , Unsafety } ;
17
- use ast:: { Mod , BiAdd , Arg , Arm , Attribute , BindByRef , BindByValue } ;
17
+ use ast:: { Mod , BiAdd , Arg , Arm , Attribute , BindingMode } ;
18
18
use ast:: { BiBitAnd , BiBitOr , BiBitXor , BiRem , BiLt , Block } ;
19
19
use ast:: { BlockCheckMode , CaptureByRef , CaptureByValue , CaptureClause } ;
20
20
use ast:: { Constness , ConstTraitItem , Crate , CrateConfig } ;
@@ -3278,10 +3278,10 @@ impl<'a> Parser<'a> {
3278
3278
hi = self . last_span . hi ;
3279
3279
3280
3280
let bind_type = match ( is_ref, is_mut) {
3281
- ( true , true ) => BindByRef ( MutMutable ) ,
3282
- ( true , false ) => BindByRef ( MutImmutable ) ,
3283
- ( false , true ) => BindByValue ( MutMutable ) ,
3284
- ( false , false ) => BindByValue ( MutImmutable ) ,
3281
+ ( true , true ) => BindingMode :: ByRef ( MutMutable ) ,
3282
+ ( true , false ) => BindingMode :: ByRef ( MutImmutable ) ,
3283
+ ( false , true ) => BindingMode :: ByValue ( MutMutable ) ,
3284
+ ( false , false ) => BindingMode :: ByValue ( MutImmutable ) ,
3285
3285
} ;
3286
3286
let fieldpath = codemap:: Spanned { span : self . last_span , node : fieldname} ;
3287
3287
let fieldpat = P ( ast:: Pat {
@@ -3376,11 +3376,11 @@ impl<'a> Parser<'a> {
3376
3376
// At this point, token != _, &, &&, (, [
3377
3377
if try!( self . eat_keyword ( keywords:: Mut ) ) {
3378
3378
// Parse mut ident @ pat
3379
- pat = try!( self . parse_pat_ident ( BindByValue ( MutMutable ) ) ) ;
3379
+ pat = try!( self . parse_pat_ident ( BindingMode :: ByValue ( MutMutable ) ) ) ;
3380
3380
} else if try!( self . eat_keyword ( keywords:: Ref ) ) {
3381
3381
// Parse ref ident @ pat / ref mut ident @ pat
3382
3382
let mutbl = try!( self . parse_mutability ( ) ) ;
3383
- pat = try!( self . parse_pat_ident ( BindByRef ( mutbl) ) ) ;
3383
+ pat = try!( self . parse_pat_ident ( BindingMode :: ByRef ( mutbl) ) ) ;
3384
3384
} else if try!( self . eat_keyword ( keywords:: Box ) ) {
3385
3385
// Parse box pat
3386
3386
let subpat = try!( self . parse_pat ( ) ) ;
@@ -3409,7 +3409,7 @@ impl<'a> Parser<'a> {
3409
3409
// Parse ident @ pat
3410
3410
// This can give false positives and parse nullary enums,
3411
3411
// they are dealt with later in resolve
3412
- pat = try!( self . parse_pat_ident ( BindByValue ( MutImmutable ) ) ) ;
3412
+ pat = try!( self . parse_pat_ident ( BindingMode :: ByValue ( MutImmutable ) ) ) ;
3413
3413
}
3414
3414
} else {
3415
3415
let ( qself, path) = if try!( self . eat_lt ( ) ) {
0 commit comments