@@ -46,7 +46,7 @@ pub trait AstBuilder {
46
46
fn ty_mt ( & self , ty : @ast:: Ty , mutbl : ast:: mutability ) -> ast:: mt ;
47
47
48
48
fn ty ( & self , span : span , ty : ast:: ty_ ) -> @ast:: Ty ;
49
- fn ty_path ( & self , ast:: Path , @ Option < OptVec < ast:: TyParamBound > > ) -> @ast:: Ty ;
49
+ fn ty_path ( & self , ast:: Path , Option < OptVec < ast:: TyParamBound > > ) -> @ast:: Ty ;
50
50
fn ty_ident ( & self , span : span , idents : ast:: ident ) -> @ast:: Ty ;
51
51
52
52
fn ty_rptr ( & self , span : span ,
@@ -66,7 +66,7 @@ pub trait AstBuilder {
66
66
fn ty_field_imm ( & self , span : span , name : ident , ty : @ast:: Ty ) -> ast:: ty_field ;
67
67
fn strip_bounds ( & self , bounds : & Generics ) -> Generics ;
68
68
69
- fn typaram ( & self , id : ast:: ident , bounds : @ OptVec < ast:: TyParamBound > ) -> ast:: TyParam ;
69
+ fn typaram ( & self , id : ast:: ident , bounds : OptVec < ast:: TyParamBound > ) -> ast:: TyParam ;
70
70
71
71
fn trait_ref ( & self , path : ast:: Path ) -> ast:: trait_ref ;
72
72
fn typarambound ( & self , path : ast:: Path ) -> ast:: TyParamBound ;
@@ -265,7 +265,7 @@ impl AstBuilder for @ExtCtxt {
265
265
}
266
266
}
267
267
268
- fn ty_path ( & self , path : ast:: Path , bounds : @ Option < OptVec < ast:: TyParamBound > > )
268
+ fn ty_path ( & self , path : ast:: Path , bounds : Option < OptVec < ast:: TyParamBound > > )
269
269
-> @ast:: Ty {
270
270
self . ty ( path. span ,
271
271
ast:: ty_path ( path, bounds, self . next_id ( ) ) )
@@ -275,7 +275,7 @@ impl AstBuilder for @ExtCtxt {
275
275
// to generate a bounded existential trait type.
276
276
fn ty_ident ( & self , span : span , ident : ast:: ident )
277
277
-> @ast:: Ty {
278
- self . ty_path ( self . path_ident ( span, ident) , @ None )
278
+ self . ty_path ( self . path_ident ( span, ident) , None )
279
279
}
280
280
281
281
fn ty_rptr ( & self ,
@@ -305,8 +305,7 @@ impl AstBuilder for @ExtCtxt {
305
305
self . ident_of ( "Option" )
306
306
] ,
307
307
None ,
308
- ~[ ty ] ) ,
309
- @None )
308
+ ~[ ty ] ) , None )
310
309
}
311
310
312
311
fn ty_field_imm ( & self , span : span , name : ident , ty : @ast:: Ty ) -> ast:: ty_field {
@@ -329,7 +328,7 @@ impl AstBuilder for @ExtCtxt {
329
328
}
330
329
}
331
330
332
- fn typaram ( & self , id : ast:: ident , bounds : @ OptVec < ast:: TyParamBound > ) -> ast:: TyParam {
331
+ fn typaram ( & self , id : ast:: ident , bounds : OptVec < ast:: TyParamBound > ) -> ast:: TyParam {
333
332
ast:: TyParam { ident : id, id : self . next_id ( ) , bounds : bounds }
334
333
}
335
334
@@ -344,13 +343,12 @@ impl AstBuilder for @ExtCtxt {
344
343
fn ty_vars_global ( & self , ty_params : & OptVec < ast:: TyParam > ) -> ~[ @ast:: Ty ] {
345
344
opt_vec:: take_vec (
346
345
ty_params. map ( |p| self . ty_path (
347
- self . path_global ( dummy_sp ( ) , ~[ p. ident ] ) , @ None ) ) )
346
+ self . path_global ( dummy_sp ( ) , ~[ p. ident ] ) , None ) ) )
348
347
}
349
348
350
349
fn strip_bounds ( & self , generics : & Generics ) -> Generics {
351
- let no_bounds = @opt_vec:: Empty ;
352
350
let new_params = do generics. ty_params . map |ty_param| {
353
- ast:: TyParam { bounds : no_bounds , ..copy * ty_param }
351
+ ast:: TyParam { bounds : opt_vec :: Empty , ..copy * ty_param }
354
352
} ;
355
353
Generics {
356
354
ty_params : new_params,
0 commit comments