@@ -363,17 +363,17 @@ fn parse_ty_constr(&vec[ast::arg] fn_args, &parser p) -> @ast::constr {
363
363
// Use the args list to translate each bound variable
364
364
// mentioned in a constraint to an arg index.
365
365
// Seems weird to do this in the parser, but I'm not sure how else to.
366
- fn parse_constrs ( & vec[ ast:: arg ] args , & parser p) ->
367
- ast:: spanned [ vec [ @ast:: constr] ] {
366
+ fn parse_constrs ( & vec[ ast:: arg ] args , & parser p)
367
+ -> ast:: spanned [ ( @ast:: constr ) [ ] ] {
368
368
auto lo = p. get_lo_pos ( ) ;
369
369
auto hi = p. get_hi_pos ( ) ;
370
- let vec [ @ast:: constr] constrs = [ ] ;
370
+ let ( @ast:: constr) [ ] constrs = ~ [ ] ;
371
371
if ( p. peek ( ) == token:: COLON ) {
372
372
p. bump ( ) ;
373
373
while ( true ) {
374
374
auto constr = parse_ty_constr ( args, p) ;
375
375
hi = constr. span . hi ;
376
- vec :: push ( constrs, constr) ;
376
+ constrs += ~ [ constr] ;
377
377
if ( p. peek ( ) == token:: COMMA ) { p. bump ( ) ; } else { break ; }
378
378
}
379
379
}
@@ -1799,7 +1799,7 @@ fn parse_dtor(&parser p) -> @ast::method {
1799
1799
cf=ast:: return,
1800
1800
1801
1801
// I guess dtors can't have constraints?
1802
- constraints=[ ] ) ;
1802
+ constraints=~ [ ] ) ;
1803
1803
let ast:: _fn f = rec ( decl=d, proto=ast:: proto_fn, body=b) ;
1804
1804
let ast:: method_ m =
1805
1805
rec ( ident="drop" , meth=f, id=p. get_id ( ) ) ;
@@ -1844,7 +1844,7 @@ fn parse_item_res(&parser p, ast::layer lyr, &ast::attribute[] attrs) ->
1844
1844
output=@spanned ( lo, lo, ast:: ty_nil) ,
1845
1845
purity=ast:: impure_fn,
1846
1846
cf=ast:: return,
1847
- constraints=[ ] ) ;
1847
+ constraints=~ [ ] ) ;
1848
1848
auto f = rec ( decl=decl, proto=ast:: proto_fn, body=dtor) ;
1849
1849
ret mk_item ( p, lo, dtor. span . hi , ident,
1850
1850
ast:: item_res ( f, p. get_id ( ) , ty_params, p. get_id ( ) ) , attrs) ;
0 commit comments