@@ -463,31 +463,22 @@ fn ty_of_item(tcx: ty::ctxt, mode: mode, it: @ast::item)
463
463
ast:: item_res ( decl, tps, _, _, _) {
464
464
let { bounds, params} = mk_ty_params ( tcx, tps) ;
465
465
let t_arg = ty_of_arg ( tcx, mode, decl. inputs [ 0 ] ) ;
466
- let t = {
467
- let t0 = ty:: mk_res ( tcx, local_def ( it. id ) , t_arg. ty , params) ;
468
- ty:: mk_with_id ( tcx, t0, def_id)
469
- } ;
466
+ let t = ty:: mk_res ( tcx, local_def ( it. id ) , t_arg. ty , params) ;
470
467
let t_res = { bounds: bounds, ty: t} ;
471
468
tcx. tcache . insert ( local_def ( it. id ) , t_res) ;
472
469
ret t_res;
473
470
}
474
471
ast:: item_enum ( _, tps) {
475
472
// Create a new generic polytype.
476
473
let { bounds, params} = mk_ty_params ( tcx, tps) ;
477
- let t = {
478
- let t0 = ty:: mk_enum ( tcx, local_def ( it. id ) , params) ;
479
- ty:: mk_with_id ( tcx, t0, def_id)
480
- } ;
474
+ let t = ty:: mk_enum ( tcx, local_def ( it. id ) , params) ;
481
475
let tpt = { bounds: bounds, ty: t} ;
482
476
tcx. tcache . insert ( local_def ( it. id ) , tpt) ;
483
477
ret tpt;
484
478
}
485
479
ast:: item_iface ( tps, ms) {
486
480
let { bounds, params} = mk_ty_params ( tcx, tps) ;
487
- let t = {
488
- let t0 = ty:: mk_iface ( tcx, local_def ( it. id ) , params) ;
489
- ty:: mk_with_id ( tcx, t0, def_id)
490
- } ;
481
+ let t = ty:: mk_iface ( tcx, local_def ( it. id ) , params) ;
491
482
let tpt = { bounds: bounds, ty: t} ;
492
483
tcx. tcache . insert ( local_def ( it. id ) , tpt) ;
493
484
ret tpt;
@@ -920,7 +911,6 @@ mod collect {
920
911
let def_id = local_def ( it. id ) ;
921
912
let t_arg = ty_of_arg ( tcx, m_collect, decl. inputs [ 0 ] ) ;
922
913
let t_res = ty:: mk_res ( tcx, def_id, t_arg. ty , params) ;
923
- let t_res = ty:: mk_with_id ( tcx, t_res, def_id) ;
924
914
let t_ctor = ty:: mk_fn ( tcx, {
925
915
proto: ast:: proto_box,
926
916
inputs: [ { mode: ast:: expl ( ast:: by_copy) with t_arg} ] ,
0 commit comments