@@ -23,7 +23,6 @@ pub struct Builder<'a, 'tcx: 'a> {
2323 cfg : CFG < ' tcx > ,
2424 scopes : Vec < scope:: Scope < ' tcx > > ,
2525 loop_scopes : Vec < scope:: LoopScope > ,
26- unit_temp : Lvalue < ' tcx > ,
2726 var_decls : Vec < VarDecl < ' tcx > > ,
2827 var_indices : FnvHashMap < ast:: NodeId , u32 > ,
2928 temp_decls : Vec < TempDecl < ' tcx > > ,
@@ -79,7 +78,7 @@ macro_rules! unpack {
7978///////////////////////////////////////////////////////////////////////////
8079// construct() -- the main entry point for building MIR for a function
8180
82- pub fn construct < ' a , ' tcx > ( mut hir : Cx < ' a , ' tcx > ,
81+ pub fn construct < ' a , ' tcx > ( hir : Cx < ' a , ' tcx > ,
8382 _span : Span ,
8483 implicit_arguments : Vec < Ty < ' tcx > > ,
8584 explicit_arguments : Vec < ( Ty < ' tcx > , & ' tcx hir:: Pat ) > ,
@@ -89,20 +88,14 @@ pub fn construct<'a,'tcx>(mut hir: Cx<'a,'tcx>,
8988 -> Mir < ' tcx > {
9089 let cfg = CFG { basic_blocks : vec ! [ ] } ;
9190
92- // it's handy to have a temporary of type `()` sometimes, so make
93- // one from the start and keep it available
94- let temp_decls = vec ! [ TempDecl :: <' tcx> { ty: hir. unit_ty( ) } ] ;
95- let unit_temp = Lvalue :: Temp ( 0 ) ;
96-
9791 let mut builder = Builder {
9892 hir : hir,
9993 cfg : cfg,
10094 scopes : vec ! [ ] ,
10195 loop_scopes : vec ! [ ] ,
102- temp_decls : temp_decls ,
96+ temp_decls : vec ! [ ] ,
10397 var_decls : vec ! [ ] ,
10498 var_indices : FnvHashMap ( ) ,
105- unit_temp : unit_temp,
10699 } ;
107100
108101 assert_eq ! ( builder. cfg. start_new_block( ) , START_BLOCK ) ;
0 commit comments