@@ -60,7 +60,7 @@ impl gen_send for message {
60
60
61
61
let pipe_ty = cx. ty_path (
62
62
path ( ~[ this. data_name ( ) ] , span)
63
- . add_tys ( cx. ty_vars ( & this. generics . ty_params ) ) , @ None ) ;
63
+ . add_tys ( cx. ty_vars ( & this. generics . ty_params ) ) , None ) ;
64
64
let args_ast = vec:: append (
65
65
~[ cx. arg ( span, cx. ident_of ( "pipe" ) , pipe_ty) ] ,
66
66
args_ast) ;
@@ -117,7 +117,7 @@ impl gen_send for message {
117
117
118
118
let mut rty = cx. ty_path ( path ( ~[ next. data_name ( ) ] ,
119
119
span)
120
- . add_tys ( copy next_state. tys ) , @ None ) ;
120
+ . add_tys ( copy next_state. tys ) , None ) ;
121
121
if try {
122
122
rty = cx. ty_option ( rty) ;
123
123
}
@@ -145,7 +145,7 @@ impl gen_send for message {
145
145
cx. ty_path (
146
146
path ( ~[ this. data_name ( ) ] , span)
147
147
. add_tys ( cx. ty_vars (
148
- & this. generics . ty_params ) ) , @ None ) ) ] ,
148
+ & this. generics . ty_params ) ) , None ) ) ] ,
149
149
args_ast) ;
150
150
151
151
let message_args = if arg_names. len ( ) == 0 {
@@ -191,7 +191,7 @@ impl gen_send for message {
191
191
192
192
fn to_ty( & mut self, cx: @ExtCtxt ) -> @ast:: Ty {
193
193
cx. ty_path ( path ( ~[ cx. ident_of ( self . name ( ) ) ] , self . span ( ) )
194
- . add_tys ( cx. ty_vars ( & self . get_generics ( ) . ty_params ) ) , @ None )
194
+ . add_tys ( cx. ty_vars ( & self . get_generics ( ) . ty_params ) ) , None )
195
195
}
196
196
}
197
197
@@ -225,7 +225,7 @@ impl to_type_decls for state {
225
225
cx. ty_path(
226
226
path( ~[ cx. ident_of( dir) ,
227
227
cx. ident_of( next_name) ] , span)
228
- . add_tys( copy next_state. tys) , @ None ) )
228
+ . add_tys( copy next_state. tys) , None ) )
229
229
}
230
230
None => tys
231
231
} ;
@@ -278,8 +278,7 @@ impl to_type_decls for state {
278
278
self . data_name ( ) ] ,
279
279
dummy_sp ( ) )
280
280
. add_tys ( cx. ty_vars (
281
- & self . generics . ty_params ) ) , @None ) ) ,
282
- @None ) ,
281
+ & self . generics . ty_params ) ) , None ) ) , None ) ,
283
282
cx. strip_bounds ( & self . generics ) ) ) ;
284
283
}
285
284
else {
@@ -298,8 +297,8 @@ impl to_type_decls for state {
298
297
self . data_name ( ) ] ,
299
298
dummy_sp ( ) )
300
299
. add_tys ( cx. ty_vars_global (
301
- & self . generics . ty_params ) ) , @ None ) ,
302
- self . proto . buffer_ty_path ( cx) ] ) , @ None ) ,
300
+ & self . generics . ty_params ) ) , None ) ,
301
+ self . proto . buffer_ty_path ( cx) ] ) , None ) ,
303
302
cx. strip_bounds ( & self . generics ) ) ) ;
304
303
} ;
305
304
items
@@ -372,10 +371,10 @@ impl gen_init for protocol {
372
371
373
372
fn buffer_ty_path( & self , cx : @ExtCtxt ) -> @ast:: Ty {
374
373
let mut params: OptVec < ast:: TyParam > = opt_vec:: Empty ;
375
- for ( copy self. states) . iter( ) . advance |s| {
374
+ for self . states. iter( ) . advance |s| {
376
375
for s. generics. ty_params. iter( ) . advance |tp| {
377
376
match params. iter( ) . find_( |tpp| tp. ident == tpp. ident) {
378
- None => params. push( * tp) ,
377
+ None => params. push( copy * tp) ,
379
378
_ => ( )
380
379
}
381
380
}
@@ -384,16 +383,16 @@ impl gen_init for protocol {
384
383
cx. ty_path( path( ~[ cx. ident_of( "super" ) ,
385
384
cx. ident_of( "__Buffer" ) ] ,
386
385
copy self. span)
387
- . add_tys( cx. ty_vars_global( & params) ) , @ None )
386
+ . add_tys( cx. ty_vars_global( & params) ) , None )
388
387
}
389
388
390
389
fn gen_buffer_type( & self , cx: @ExtCtxt ) -> @ast:: item {
391
390
let ext_cx = cx;
392
391
let mut params : OptVec < ast:: TyParam > = opt_vec:: Empty ;
393
- let fields = do ( copy self. states) . iter( ) . transform |s| {
392
+ let fields = do self . states. iter( ) . transform |s| {
394
393
for s. generics. ty_params. iter( ) . advance |tp| {
395
394
match params. iter( ) . find_( |tpp| tp. ident == tpp. ident) {
396
- None => params. push( * tp) ,
395
+ None => params. push( copy * tp) ,
397
396
_ => ( )
398
397
}
399
398
}
0 commit comments