@@ -76,22 +76,22 @@ fn ty_param_bounds_and_ty_for_def(fcx: @fn_ctxt, sp: span, defn: ast::def) ->
76
76
ast : : def_arg ( id, _) {
77
77
assert ( fcx. locals . contains_key ( id. node ) ) ;
78
78
let typ = ty:: mk_var ( fcx. ccx . tcx , lookup_local ( fcx, sp, id. node ) ) ;
79
- ret { bounds : [ ] , ty : typ} ;
79
+ ret @ { bounds : [ ] , ty : typ} ;
80
80
}
81
81
ast:: def_local ( id, _) {
82
82
assert ( fcx. locals . contains_key ( id. node ) ) ;
83
83
let typ = ty:: mk_var ( fcx. ccx . tcx , lookup_local ( fcx, sp, id. node ) ) ;
84
- ret { bounds : [ ] , ty : typ} ;
84
+ ret @ { bounds : [ ] , ty : typ} ;
85
85
}
86
86
ast:: def_obj_field ( id, _) {
87
87
assert ( fcx. locals . contains_key ( id. node ) ) ;
88
88
let typ = ty:: mk_var ( fcx. ccx . tcx , lookup_local ( fcx, sp, id. node ) ) ;
89
- ret { bounds : [ ] , ty : typ} ;
89
+ ret @ { bounds : [ ] , ty : typ} ;
90
90
}
91
91
ast:: def_self ( id) {
92
92
alt get_self_info ( fcx. ccx ) {
93
93
some ( self_obj ( _, obj_t) ) | some ( self_impl ( obj_t) ) {
94
- ret { bounds : [ ] , ty : obj_t} ;
94
+ ret @ { bounds : [ ] , ty : obj_t} ;
95
95
}
96
96
}
97
97
}
@@ -102,12 +102,12 @@ fn ty_param_bounds_and_ty_for_def(fcx: @fn_ctxt, sp: span, defn: ast::def) ->
102
102
ast:: def_binding ( id) {
103
103
assert ( fcx. locals . contains_key ( id. node ) ) ;
104
104
let typ = ty:: mk_var ( fcx. ccx . tcx , lookup_local ( fcx, sp, id. node ) ) ;
105
- ret { bounds : [ ] , ty : typ} ;
105
+ ret @ { bounds : [ ] , ty : typ} ;
106
106
}
107
107
ast:: def_mod ( _) {
108
108
// Hopefully part of a path.
109
109
// TODO: return a type that's more poisonous, perhaps?
110
- ret { bounds : [ ] , ty : ty:: mk_nil ( fcx. ccx . tcx ) } ;
110
+ ret @ { bounds : [ ] , ty : ty:: mk_nil ( fcx. ccx . tcx ) } ;
111
111
}
112
112
ast:: def_ty ( _) {
113
113
fcx. ccx . tcx . sess . span_fatal ( sp, "expected value but found type" ) ;
@@ -382,7 +382,7 @@ fn ty_of_item(tcx: ty::ctxt, mode: mode, it: @ast::item)
382
382
alt it. node {
383
383
ast:: item_const ( t, _) {
384
384
let typ = ast_ty_to_ty ( tcx, mode, t) ;
385
- let tpt = { bounds: [ ] , ty: typ} ;
385
+ let tpt = @ { bounds: [ ] , ty: typ} ;
386
386
tcx. tcache . insert ( local_def ( it. id ) , tpt) ;
387
387
ret tpt;
388
388
}
@@ -401,7 +401,7 @@ fn ty_of_item(tcx: ty::ctxt, mode: mode, it: @ast::item)
401
401
}
402
402
// Tell ast_ty_to_ty() that we want to perform a recursive
403
403
// call to resolve any named types.
404
- let tpt = { bounds: ty_param_bounds ( tcx, mode, tps) ,
404
+ let tpt = @ { bounds: ty_param_bounds ( tcx, mode, tps) ,
405
405
ty: ty:: mk_named ( tcx, ast_ty_to_ty ( tcx, mode, t) ,
406
406
@it. ident ) } ;
407
407
tcx. tcache . insert ( local_def ( it. id ) , tpt) ;
@@ -413,7 +413,7 @@ fn ty_of_item(tcx: ty::ctxt, mode: mode, it: @ast::item)
413
413
let t = ty:: mk_named ( tcx, ty:: mk_res ( tcx, local_def ( it. id ) , t_arg. ty ,
414
414
params) ,
415
415
@it. ident ) ;
416
- let t_res = { bounds: bounds, ty: t} ;
416
+ let t_res = @ { bounds: bounds, ty: t} ;
417
417
tcx. tcache . insert ( local_def ( it. id ) , t_res) ;
418
418
ret t_res;
419
419
}
@@ -422,7 +422,7 @@ fn ty_of_item(tcx: ty::ctxt, mode: mode, it: @ast::item)
422
422
let { bounds, params} = mk_ty_params ( tcx, tps) ;
423
423
let t = ty:: mk_named ( tcx, ty:: mk_tag ( tcx, local_def ( it. id ) , params) ,
424
424
@it. ident ) ;
425
- let tpt = { bounds: bounds, ty: t} ;
425
+ let tpt = @ { bounds: bounds, ty: t} ;
426
426
tcx. tcache . insert ( local_def ( it. id ) , tpt) ;
427
427
ret tpt;
428
428
}
@@ -431,7 +431,7 @@ fn ty_of_item(tcx: ty::ctxt, mode: mode, it: @ast::item)
431
431
let t = ty:: mk_named ( tcx, ty:: mk_iface ( tcx, local_def ( it. id ) ,
432
432
params) ,
433
433
@it. ident ) ;
434
- let tpt = { bounds: bounds, ty: t} ;
434
+ let tpt = @ { bounds: bounds, ty: t} ;
435
435
tcx. tcache . insert ( local_def ( it. id ) , tpt) ;
436
436
ty:: store_iface_methods ( tcx, it. id , @vec:: map ( ms, { |m|
437
437
ty_of_ty_method ( tcx, m_collect, m)
@@ -455,7 +455,7 @@ fn ty_of_native_item(tcx: ty::ctxt, mode: mode, it: @ast::native_item)
455
455
none. { }
456
456
}
457
457
let t = ty:: mk_native ( tcx, ast_util:: local_def ( it. id ) ) ;
458
- let tpt = { bounds: [ ] , ty: t} ;
458
+ let tpt = @ { bounds: [ ] , ty: t} ;
459
459
tcx. tcache . insert ( local_def ( it. id ) , tpt) ;
460
460
ret tpt;
461
461
}
@@ -480,7 +480,7 @@ fn ty_of_fn_decl(tcx: ty::ctxt, mode: mode, decl: ast::fn_decl) -> ty::fn_ty {
480
480
fn ty_of_fn ( tcx : ty:: ctxt , mode : mode , decl : ast:: fn_decl ,
481
481
ty_params : [ ast:: ty_param ] , def_id : ast:: def_id )
482
482
-> ty:: ty_param_bounds_and_ty {
483
- let tpt = { bounds: ty_param_bounds ( tcx, mode, ty_params) ,
483
+ let tpt = @ { bounds: ty_param_bounds ( tcx, mode, ty_params) ,
484
484
ty: ty:: mk_fn ( tcx, ty_of_fn_decl ( tcx, mode, decl) ) } ;
485
485
tcx. tcache . insert ( def_id, tpt) ;
486
486
ret tpt;
@@ -493,7 +493,7 @@ fn ty_of_native_fn_decl(tcx: ty::ctxt, mode: mode, decl: ast::fn_decl,
493
493
let output_ty = ast_ty_to_ty ( tcx, mode, decl. output ) ;
494
494
495
495
let t_fn = ty:: mk_native_fn ( tcx, input_tys, output_ty) ;
496
- let tpt = { bounds: bounds, ty: t_fn} ;
496
+ let tpt = @ { bounds: bounds, ty: t_fn} ;
497
497
tcx. tcache . insert ( def_id, tpt) ;
498
498
ret tpt;
499
499
}
@@ -537,7 +537,7 @@ fn ty_of_obj(tcx: ty::ctxt, mode: mode, id: ast::ident, ob: ast::_obj,
537
537
let methods = vec:: map ( ob. methods , { |m| ty_of_method ( tcx, mode, m) } ) ;
538
538
let t_obj = ty:: mk_named ( tcx, ty:: mk_obj ( tcx, ty:: sort_methods ( methods) ) ,
539
539
@id) ;
540
- ret { bounds : bounds, ty : t_obj} ;
540
+ ret @ { bounds : bounds, ty : t_obj} ;
541
541
}
542
542
fn ty_of_obj_ctor ( tcx : ty:: ctxt , mode : mode , id : ast:: ident , ob : ast:: _obj ,
543
543
ctor_id : ast:: node_id , ty_params : [ ast:: ty_param ] )
@@ -551,7 +551,7 @@ fn ty_of_obj_ctor(tcx: ty::ctxt, mode: mode, id: ast::ident, ob: ast::_obj,
551
551
let t_fn = ty:: mk_fn ( tcx, { proto: ast:: proto_shared ( ast:: sugar_normal) ,
552
552
inputs: t_inputs, output: t_obj. ty ,
553
553
ret_style: ast:: return_val, constraints: [ ] } ) ;
554
- let tpt = { bounds: ty_param_bounds ( tcx, mode, ty_params) , ty: t_fn} ;
554
+ let tpt = @ { bounds: ty_param_bounds ( tcx, mode, ty_params) , ty: t_fn} ;
555
555
tcx. tcache . insert ( local_def ( ctor_id) , tpt) ;
556
556
ret tpt;
557
557
}
@@ -672,7 +672,7 @@ mod collect {
672
672
inputs: args, output: tag_ty,
673
673
ret_style: ast:: return_val, constraints: [ ] } )
674
674
} ;
675
- let tpt = { bounds: ty_param_bounds ( cx. tcx , m_collect, ty_params) ,
675
+ let tpt = @ { bounds: ty_param_bounds ( cx. tcx , m_collect, ty_params) ,
676
676
ty: result_ty} ;
677
677
cx. tcx . tcache . insert ( local_def ( variant. node . id ) , tpt) ;
678
678
write:: ty_only ( cx. tcx , variant. node . id , result_ty) ;
@@ -693,7 +693,7 @@ mod collect {
693
693
let bounds = ty_param_bounds ( cx. tcx , m_collect, m. tps ) ;
694
694
let ty = ty:: mk_fn ( cx. tcx , ty_of_fn_decl ( cx. tcx , m_collect,
695
695
m. decl ) ) ;
696
- cx. tcx . tcache . insert ( local_def ( m. id ) , { bounds: bounds,
696
+ cx. tcx . tcache . insert ( local_def ( m. id ) , @ { bounds: bounds,
697
697
ty: ty} ) ;
698
698
write:: ty_only ( cx. tcx , m. id , ty) ;
699
699
}
@@ -751,7 +751,7 @@ mod collect {
751
751
write:: ty_only ( cx. tcx , it. id , t_res) ;
752
752
write:: ty_only ( cx. tcx , ctor_id, t_ctor) ;
753
753
cx. tcx . tcache . insert ( local_def ( ctor_id) ,
754
- { bounds: bounds,
754
+ @ { bounds: bounds,
755
755
ty: t_ctor} ) ;
756
756
write:: ty_only ( cx. tcx , dtor_id, t_dtor) ;
757
757
}
0 commit comments