1414//! Routines for manipulating the control-flow graph.
1515
1616use build:: CFG ;
17- use hair:: * ;
1817use repr:: * ;
18+ use syntax:: codemap:: Span ;
1919
20- impl < H : Hair > CFG < H > {
21- pub fn block_data ( & self , blk : BasicBlock ) -> & BasicBlockData < H > {
20+ impl < ' tcx > CFG < ' tcx > {
21+ pub fn block_data ( & self , blk : BasicBlock ) -> & BasicBlockData < ' tcx > {
2222 & self . basic_blocks [ blk. index ( ) ]
2323 }
2424
25- pub fn block_data_mut ( & mut self , blk : BasicBlock ) -> & mut BasicBlockData < H > {
25+ pub fn block_data_mut ( & mut self , blk : BasicBlock ) -> & mut BasicBlockData < ' tcx > {
2626 & mut self . basic_blocks [ blk. index ( ) ]
2727 }
2828
@@ -39,21 +39,21 @@ impl<H:Hair> CFG<H> {
3939 BasicBlock :: new ( node_index)
4040 }
4141
42- pub fn push ( & mut self , block : BasicBlock , statement : Statement < H > ) {
42+ pub fn push ( & mut self , block : BasicBlock , statement : Statement < ' tcx > ) {
4343 debug ! ( "push({:?}, {:?})" , block, statement) ;
4444 self . block_data_mut ( block) . statements . push ( statement) ;
4545 }
4646
4747 pub fn push_assign_constant ( & mut self ,
4848 block : BasicBlock ,
49- span : H :: Span ,
50- temp : & Lvalue < H > ,
51- constant : Constant < H > ) {
49+ span : Span ,
50+ temp : & Lvalue < ' tcx > ,
51+ constant : Constant < ' tcx > ) {
5252 self . push_assign ( block, span, temp, Rvalue :: Use ( Operand :: Constant ( constant) ) ) ;
5353 }
5454
55- pub fn push_drop ( & mut self , block : BasicBlock , span : H :: Span ,
56- kind : DropKind , lvalue : & Lvalue < H > ) {
55+ pub fn push_drop ( & mut self , block : BasicBlock , span : Span ,
56+ kind : DropKind , lvalue : & Lvalue < ' tcx > ) {
5757 self . push ( block, Statement {
5858 span : span,
5959 kind : StatementKind :: Drop ( kind, lvalue. clone ( ) )
@@ -62,9 +62,9 @@ impl<H:Hair> CFG<H> {
6262
6363 pub fn push_assign ( & mut self ,
6464 block : BasicBlock ,
65- span : H :: Span ,
66- lvalue : & Lvalue < H > ,
67- rvalue : Rvalue < H > ) {
65+ span : Span ,
66+ lvalue : & Lvalue < ' tcx > ,
67+ rvalue : Rvalue < ' tcx > ) {
6868 self . push ( block, Statement {
6969 span : span,
7070 kind : StatementKind :: Assign ( lvalue. clone ( ) , rvalue)
@@ -73,7 +73,7 @@ impl<H:Hair> CFG<H> {
7373
7474 pub fn terminate ( & mut self ,
7575 block : BasicBlock ,
76- terminator : Terminator < H > ) {
76+ terminator : Terminator < ' tcx > ) {
7777 // Check whether this block has already been terminated. For
7878 // this, we rely on the fact that the initial state is to have
7979 // a Diverge terminator and an empty list of targets (which
0 commit comments