@@ -38,17 +38,17 @@ enum MergingSucc {
3838
3939/// Used by `FunctionCx::codegen_terminator` for emitting common patterns
4040/// e.g., creating a basic block, calling a function, etc.
41- struct TerminatorCodegenHelper < ' tcx > {
41+ struct TerminatorCodegenHelper < ' body , ' tcx > {
4242 bb : mir:: BasicBlock ,
43- terminator : & ' tcx mir:: Terminator < ' tcx > ,
43+ terminator : & ' body mir:: Terminator < ' tcx > ,
4444}
4545
46- impl < ' a , ' tcx > TerminatorCodegenHelper < ' tcx > {
46+ impl < ' body , ' a , ' tcx > TerminatorCodegenHelper < ' body , ' tcx > {
4747 /// Returns the appropriate `Funclet` for the current funclet, if on MSVC,
4848 /// either already previously cached, or newly created, by `landing_pad_for`.
4949 fn funclet < ' b , Bx : BuilderMethods < ' a , ' tcx > > (
5050 & self ,
51- fx : & ' b mut FunctionCx < ' a , ' tcx , Bx > ,
51+ fx : & ' b mut FunctionCx < ' body , ' a , ' tcx , Bx > ,
5252 ) -> Option < & ' b Bx :: Funclet > {
5353 let cleanup_kinds = fx. cleanup_kinds . as_ref ( ) ?;
5454 let funclet_bb = cleanup_kinds[ self . bb ] . funclet_bb ( self . bb ) ?;
@@ -74,7 +74,7 @@ impl<'a, 'tcx> TerminatorCodegenHelper<'tcx> {
7474 /// stuff in it or next to it.
7575 fn llbb_with_cleanup < Bx : BuilderMethods < ' a , ' tcx > > (
7676 & self ,
77- fx : & mut FunctionCx < ' a , ' tcx , Bx > ,
77+ fx : & mut FunctionCx < ' body , ' a , ' tcx , Bx > ,
7878 target : mir:: BasicBlock ,
7979 ) -> Bx :: BasicBlock {
8080 let ( needs_landing_pad, is_cleanupret) = self . llbb_characteristics ( fx, target) ;
@@ -98,7 +98,7 @@ impl<'a, 'tcx> TerminatorCodegenHelper<'tcx> {
9898
9999 fn llbb_characteristics < Bx : BuilderMethods < ' a , ' tcx > > (
100100 & self ,
101- fx : & mut FunctionCx < ' a , ' tcx , Bx > ,
101+ fx : & mut FunctionCx < ' body , ' a , ' tcx , Bx > ,
102102 target : mir:: BasicBlock ,
103103 ) -> ( bool , bool ) {
104104 if let Some ( ref cleanup_kinds) = fx. cleanup_kinds {
@@ -123,7 +123,7 @@ impl<'a, 'tcx> TerminatorCodegenHelper<'tcx> {
123123
124124 fn funclet_br < Bx : BuilderMethods < ' a , ' tcx > > (
125125 & self ,
126- fx : & mut FunctionCx < ' a , ' tcx , Bx > ,
126+ fx : & mut FunctionCx < ' body , ' a , ' tcx , Bx > ,
127127 bx : & mut Bx ,
128128 target : mir:: BasicBlock ,
129129 mergeable_succ : bool ,
@@ -152,7 +152,7 @@ impl<'a, 'tcx> TerminatorCodegenHelper<'tcx> {
152152 /// return destination `destination` and the unwind action `unwind`.
153153 fn do_call < Bx : BuilderMethods < ' a , ' tcx > > (
154154 & self ,
155- fx : & mut FunctionCx < ' a , ' tcx , Bx > ,
155+ fx : & mut FunctionCx < ' body , ' a , ' tcx , Bx > ,
156156 bx : & mut Bx ,
157157 fn_abi : & ' tcx FnAbi < ' tcx , Ty < ' tcx > > ,
158158 fn_ptr : Bx :: Value ,
@@ -271,7 +271,7 @@ impl<'a, 'tcx> TerminatorCodegenHelper<'tcx> {
271271 /// Generates inline assembly with optional `destination` and `unwind`.
272272 fn do_inlineasm < Bx : BuilderMethods < ' a , ' tcx > > (
273273 & self ,
274- fx : & mut FunctionCx < ' a , ' tcx , Bx > ,
274+ fx : & mut FunctionCx < ' body , ' a , ' tcx , Bx > ,
275275 bx : & mut Bx ,
276276 template : & [ InlineAsmTemplatePiece ] ,
277277 operands : & [ InlineAsmOperandRef < ' tcx , Bx > ] ,
@@ -338,9 +338,13 @@ impl<'a, 'tcx> TerminatorCodegenHelper<'tcx> {
338338}
339339
340340/// Codegen implementations for some terminator variants.
341- impl < ' a , ' tcx , Bx : BuilderMethods < ' a , ' tcx > > FunctionCx < ' a , ' tcx , Bx > {
341+ impl < ' body , ' a , ' tcx , Bx : BuilderMethods < ' a , ' tcx > > FunctionCx < ' body , ' a , ' tcx , Bx > {
342342 /// Generates code for a `Resume` terminator.
343- fn codegen_resume_terminator ( & mut self , helper : TerminatorCodegenHelper < ' tcx > , bx : & mut Bx ) {
343+ fn codegen_resume_terminator (
344+ & mut self ,
345+ helper : TerminatorCodegenHelper < ' body , ' tcx > ,
346+ bx : & mut Bx ,
347+ ) {
344348 if let Some ( funclet) = helper. funclet ( self ) {
345349 bx. cleanup_ret ( funclet, None ) ;
346350 } else {
@@ -357,7 +361,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
357361
358362 fn codegen_switchint_terminator (
359363 & mut self ,
360- helper : TerminatorCodegenHelper < ' tcx > ,
364+ helper : TerminatorCodegenHelper < ' body , ' tcx > ,
361365 bx : & mut Bx ,
362366 discr : & mir:: Operand < ' tcx > ,
363367 targets : & SwitchTargets ,
@@ -497,7 +501,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
497501 #[ tracing:: instrument( level = "trace" , skip( self , helper, bx) ) ]
498502 fn codegen_drop_terminator (
499503 & mut self ,
500- helper : TerminatorCodegenHelper < ' tcx > ,
504+ helper : TerminatorCodegenHelper < ' body , ' tcx > ,
501505 bx : & mut Bx ,
502506 location : mir:: Place < ' tcx > ,
503507 target : mir:: BasicBlock ,
@@ -622,7 +626,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
622626
623627 fn codegen_assert_terminator (
624628 & mut self ,
625- helper : TerminatorCodegenHelper < ' tcx > ,
629+ helper : TerminatorCodegenHelper < ' body , ' tcx > ,
626630 bx : & mut Bx ,
627631 terminator : & mir:: Terminator < ' tcx > ,
628632 cond : & mir:: Operand < ' tcx > ,
@@ -701,7 +705,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
701705
702706 fn codegen_terminate_terminator (
703707 & mut self ,
704- helper : TerminatorCodegenHelper < ' tcx > ,
708+ helper : TerminatorCodegenHelper < ' body , ' tcx > ,
705709 bx : & mut Bx ,
706710 terminator : & mir:: Terminator < ' tcx > ,
707711 reason : UnwindTerminateReason ,
@@ -731,7 +735,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
731735 /// Returns `Some` if this is indeed a panic intrinsic and codegen is done.
732736 fn codegen_panic_intrinsic (
733737 & mut self ,
734- helper : & TerminatorCodegenHelper < ' tcx > ,
738+ helper : & TerminatorCodegenHelper < ' body , ' tcx > ,
735739 bx : & mut Bx ,
736740 intrinsic : Option < ty:: IntrinsicDef > ,
737741 instance : Option < Instance < ' tcx > > ,
@@ -800,7 +804,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
800804
801805 fn codegen_call_terminator (
802806 & mut self ,
803- helper : TerminatorCodegenHelper < ' tcx > ,
807+ helper : TerminatorCodegenHelper < ' body , ' tcx > ,
804808 bx : & mut Bx ,
805809 terminator : & mir:: Terminator < ' tcx > ,
806810 func : & mir:: Operand < ' tcx > ,
@@ -1152,7 +1156,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
11521156
11531157 fn codegen_asm_terminator (
11541158 & mut self ,
1155- helper : TerminatorCodegenHelper < ' tcx > ,
1159+ helper : TerminatorCodegenHelper < ' body , ' tcx > ,
11561160 bx : & mut Bx ,
11571161 terminator : & mir:: Terminator < ' tcx > ,
11581162 template : & [ ast:: InlineAsmTemplatePiece ] ,
@@ -1236,7 +1240,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
12361240 }
12371241}
12381242
1239- impl < ' a , ' tcx , Bx : BuilderMethods < ' a , ' tcx > > FunctionCx < ' a , ' tcx , Bx > {
1243+ impl < ' body , ' a , ' tcx , Bx : BuilderMethods < ' a , ' tcx > > FunctionCx < ' body , ' a , ' tcx , Bx > {
12401244 pub fn codegen_block ( & mut self , mut bb : mir:: BasicBlock ) {
12411245 let llbb = match self . try_llbb ( bb) {
12421246 Some ( llbb) => llbb,
@@ -1291,7 +1295,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
12911295 & mut self ,
12921296 bx : & mut Bx ,
12931297 bb : mir:: BasicBlock ,
1294- terminator : & ' tcx mir:: Terminator < ' tcx > ,
1298+ terminator : & ' body mir:: Terminator < ' tcx > ,
12951299 ) -> MergingSucc {
12961300 debug ! ( "codegen_terminator: {:?}" , terminator) ;
12971301
0 commit comments