@@ -23,7 +23,6 @@ pub struct Builder<'a, 'tcx: 'a> {
23
23
cfg : CFG < ' tcx > ,
24
24
scopes : Vec < scope:: Scope < ' tcx > > ,
25
25
loop_scopes : Vec < scope:: LoopScope > ,
26
- unit_temp : Lvalue < ' tcx > ,
27
26
var_decls : Vec < VarDecl < ' tcx > > ,
28
27
var_indices : FnvHashMap < ast:: NodeId , u32 > ,
29
28
temp_decls : Vec < TempDecl < ' tcx > > ,
@@ -79,7 +78,7 @@ macro_rules! unpack {
79
78
///////////////////////////////////////////////////////////////////////////
80
79
// construct() -- the main entry point for building MIR for a function
81
80
82
- pub fn construct < ' a , ' tcx > ( mut hir : Cx < ' a , ' tcx > ,
81
+ pub fn construct < ' a , ' tcx > ( hir : Cx < ' a , ' tcx > ,
83
82
_span : Span ,
84
83
implicit_arguments : Vec < Ty < ' tcx > > ,
85
84
explicit_arguments : Vec < ( Ty < ' tcx > , & ' tcx hir:: Pat ) > ,
@@ -89,20 +88,14 @@ pub fn construct<'a,'tcx>(mut hir: Cx<'a,'tcx>,
89
88
-> Mir < ' tcx > {
90
89
let cfg = CFG { basic_blocks : vec ! [ ] } ;
91
90
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
-
97
91
let mut builder = Builder {
98
92
hir : hir,
99
93
cfg : cfg,
100
94
scopes : vec ! [ ] ,
101
95
loop_scopes : vec ! [ ] ,
102
- temp_decls : temp_decls ,
96
+ temp_decls : vec ! [ ] ,
103
97
var_decls : vec ! [ ] ,
104
98
var_indices : FnvHashMap ( ) ,
105
- unit_temp : unit_temp,
106
99
} ;
107
100
108
101
assert_eq ! ( builder. cfg. start_new_block( ) , START_BLOCK ) ;
0 commit comments