@@ -189,11 +189,11 @@ fn parse_trait_store(st: &mut PState) -> ty::TraitStore {
189
189
fn parse_substs ( st : & mut PState , conv : conv_did ) -> ty:: substs {
190
190
let self_r = parse_opt ( st, |st| parse_region ( st) ) ;
191
191
192
- let self_ty = parse_opt ( st, |st| parse_ty ( st, conv) ) ;
192
+ let self_ty = parse_opt ( st, |st| parse_ty ( st, |x , y| conv ( x , y ) ) ) ;
193
193
194
194
assert_eq ! ( next( st) , '[' ) ;
195
195
let mut params: ~[ ty:: t ] = ~[ ] ;
196
- while peek ( st) != ']' { params. push ( parse_ty ( st, conv) ) ; }
196
+ while peek ( st) != ']' { params. push ( parse_ty ( st, |x , y| conv ( x , y ) ) ) ; }
197
197
st. pos = st. pos + 1 u;
198
198
199
199
return ty:: substs {
@@ -270,8 +270,8 @@ fn parse_str(st: &mut PState, term: char) -> ~str {
270
270
}
271
271
272
272
fn parse_trait_ref ( st : & mut PState , conv : conv_did ) -> ty:: TraitRef {
273
- let def = parse_def ( st, NominalType , conv) ;
274
- let substs = parse_substs ( st, conv) ;
273
+ let def = parse_def ( st, NominalType , |x , y| conv ( x , y ) ) ;
274
+ let substs = parse_substs ( st, |x , y| conv ( x , y ) ) ;
275
275
ty:: TraitRef { def_id : def, substs : substs}
276
276
}
277
277
@@ -301,18 +301,18 @@ fn parse_ty(st: &mut PState, conv: conv_did) -> ty::t {
301
301
'c' => return ty:: mk_char ( ) ,
302
302
't' => {
303
303
assert_eq ! ( next( st) , '[' ) ;
304
- let def = parse_def ( st, NominalType , conv) ;
305
- let substs = parse_substs ( st, conv) ;
304
+ let def = parse_def ( st, NominalType , |x , y| conv ( x , y ) ) ;
305
+ let substs = parse_substs ( st, |x , y| conv ( x , y ) ) ;
306
306
assert_eq ! ( next( st) , ']' ) ;
307
307
return ty:: mk_enum ( st. tcx , def, substs) ;
308
308
}
309
309
'x' => {
310
310
assert_eq ! ( next( st) , '[' ) ;
311
- let def = parse_def ( st, NominalType , conv) ;
312
- let substs = parse_substs ( st, conv) ;
311
+ let def = parse_def ( st, NominalType , |x , y| conv ( x , y ) ) ;
312
+ let substs = parse_substs ( st, |x , y| conv ( x , y ) ) ;
313
313
let store = parse_trait_store ( st) ;
314
314
let mt = parse_mutability ( st) ;
315
- let bounds = parse_bounds ( st, conv) ;
315
+ let bounds = parse_bounds ( st, |x , y| conv ( x , y ) ) ;
316
316
assert_eq ! ( next( st) , ']' ) ;
317
317
return ty:: mk_trait ( st. tcx , def, substs, store, mt, bounds. builtin_bounds ) ;
318
318
}
@@ -346,7 +346,7 @@ fn parse_ty(st: &mut PState, conv: conv_did) -> ty::t {
346
346
'T' => {
347
347
assert_eq ! ( next( st) , '[' ) ;
348
348
let mut params = ~[ ] ;
349
- while peek ( st) != ']' { params. push ( parse_ty ( st, conv) ) ; }
349
+ while peek ( st) != ']' { params. push ( parse_ty ( st, |x , y| conv ( x , y ) ) ) ; }
350
350
st. pos = st. pos + 1 u;
351
351
return ty:: mk_tup ( st. tcx , params) ;
352
352
}
@@ -380,15 +380,15 @@ fn parse_ty(st: &mut PState, conv: conv_did) -> ty::t {
380
380
}
381
381
}
382
382
'"' => {
383
- let _ = parse_def ( st, TypeWithId , conv) ;
384
- let inner = parse_ty ( st, conv) ;
383
+ let _ = parse_def ( st, TypeWithId , |x , y| conv ( x , y ) ) ;
384
+ let inner = parse_ty ( st, |x , y| conv ( x , y ) ) ;
385
385
inner
386
386
}
387
387
'B' => ty:: mk_opaque_box ( st. tcx ) ,
388
388
'a' => {
389
389
assert_eq ! ( next( st) , '[' ) ;
390
- let did = parse_def ( st, NominalType , conv) ;
391
- let substs = parse_substs ( st, conv) ;
390
+ let did = parse_def ( st, NominalType , |x , y| conv ( x , y ) ) ;
391
+ let substs = parse_substs ( st, |x , y| conv ( x , y ) ) ;
392
392
assert_eq ! ( next( st) , ']' ) ;
393
393
return ty:: mk_struct ( st. tcx , did, substs) ;
394
394
}
@@ -473,8 +473,8 @@ fn parse_closure_ty(st: &mut PState, conv: conv_did) -> ty::ClosureTy {
473
473
let purity = parse_purity ( next ( st) ) ;
474
474
let onceness = parse_onceness ( next ( st) ) ;
475
475
let region = parse_region ( st) ;
476
- let bounds = parse_bounds ( st, conv) ;
477
- let sig = parse_sig ( st, conv) ;
476
+ let bounds = parse_bounds ( st, |x , y| conv ( x , y ) ) ;
477
+ let sig = parse_sig ( st, |x , y| conv ( x , y ) ) ;
478
478
ty:: ClosureTy {
479
479
purity : purity,
480
480
sigil : sigil,
@@ -500,7 +500,7 @@ fn parse_sig(st: &mut PState, conv: conv_did) -> ty::FnSig {
500
500
assert_eq ! ( next( st) , '[' ) ;
501
501
let mut inputs = ~[ ] ;
502
502
while peek ( st) != ']' {
503
- inputs. push ( parse_ty ( st, conv) ) ;
503
+ inputs. push ( parse_ty ( st, |x , y| conv ( x , y ) ) ) ;
504
504
}
505
505
st. pos += 1 u; // eat the ']'
506
506
let ret_ty = parse_ty ( st, conv) ;
@@ -544,8 +544,8 @@ pub fn parse_type_param_def_data(data: &[u8], start: uint,
544
544
}
545
545
546
546
fn parse_type_param_def ( st : & mut PState , conv : conv_did ) -> ty:: TypeParameterDef {
547
- ty:: TypeParameterDef { def_id : parse_def ( st, NominalType , conv) ,
548
- bounds : @parse_bounds ( st, conv) }
547
+ ty:: TypeParameterDef { def_id : parse_def ( st, NominalType , |x , y| conv ( x , y ) ) ,
548
+ bounds : @parse_bounds ( st, |x , y| conv ( x , y ) ) }
549
549
}
550
550
551
551
fn parse_bounds ( st : & mut PState , conv : conv_did ) -> ty:: ParamBounds {
@@ -571,7 +571,7 @@ fn parse_bounds(st: &mut PState, conv: conv_did) -> ty::ParamBounds {
571
571
param_bounds. builtin_bounds . add ( ty:: BoundSized ) ;
572
572
}
573
573
'I' => {
574
- param_bounds. trait_bounds . push ( @parse_trait_ref ( st, conv) ) ;
574
+ param_bounds. trait_bounds . push ( @parse_trait_ref ( st, |x , y| conv ( x , y ) ) ) ;
575
575
}
576
576
'.' => {
577
577
return param_bounds;
0 commit comments