@@ -39,17 +39,17 @@ enum MergingSucc {
3939
4040/// Used by `FunctionCx::codegen_terminator` for emitting common patterns
4141/// e.g., creating a basic block, calling a function, etc.
42- struct TerminatorCodegenHelper < ' tcx > {
42+ struct TerminatorCodegenHelper < ' body , ' tcx > {
4343 bb : mir:: BasicBlock ,
44- terminator : & ' tcx mir:: Terminator < ' tcx > ,
44+ terminator : & ' body mir:: Terminator < ' tcx > ,
4545}
4646
47- impl < ' a , ' tcx > TerminatorCodegenHelper < ' tcx > {
47+ impl < ' body , ' a , ' tcx > TerminatorCodegenHelper < ' body , ' tcx > {
4848 /// Returns the appropriate `Funclet` for the current funclet, if on MSVC,
4949 /// either already previously cached, or newly created, by `landing_pad_for`.
5050 fn funclet < ' b , Bx : BuilderMethods < ' a , ' tcx > > (
5151 & self ,
52- fx : & ' b mut FunctionCx < ' a , ' tcx , Bx > ,
52+ fx : & ' b mut FunctionCx < ' body , ' a , ' tcx , Bx > ,
5353 ) -> Option < & ' b Bx :: Funclet > {
5454 let cleanup_kinds = fx. cleanup_kinds . as_ref ( ) ?;
5555 let funclet_bb = cleanup_kinds[ self . bb ] . funclet_bb ( self . bb ) ?;
@@ -75,7 +75,7 @@ impl<'a, 'tcx> TerminatorCodegenHelper<'tcx> {
7575 /// stuff in it or next to it.
7676 fn llbb_with_cleanup < Bx : BuilderMethods < ' a , ' tcx > > (
7777 & self ,
78- fx : & mut FunctionCx < ' a , ' tcx , Bx > ,
78+ fx : & mut FunctionCx < ' body , ' a , ' tcx , Bx > ,
7979 target : mir:: BasicBlock ,
8080 ) -> Bx :: BasicBlock {
8181 let ( needs_landing_pad, is_cleanupret) = self . llbb_characteristics ( fx, target) ;
@@ -99,7 +99,7 @@ impl<'a, 'tcx> TerminatorCodegenHelper<'tcx> {
9999
100100 fn llbb_characteristics < Bx : BuilderMethods < ' a , ' tcx > > (
101101 & self ,
102- fx : & mut FunctionCx < ' a , ' tcx , Bx > ,
102+ fx : & mut FunctionCx < ' body , ' a , ' tcx , Bx > ,
103103 target : mir:: BasicBlock ,
104104 ) -> ( bool , bool ) {
105105 if let Some ( ref cleanup_kinds) = fx. cleanup_kinds {
@@ -124,7 +124,7 @@ impl<'a, 'tcx> TerminatorCodegenHelper<'tcx> {
124124
125125 fn funclet_br < Bx : BuilderMethods < ' a , ' tcx > > (
126126 & self ,
127- fx : & mut FunctionCx < ' a , ' tcx , Bx > ,
127+ fx : & mut FunctionCx < ' body , ' a , ' tcx , Bx > ,
128128 bx : & mut Bx ,
129129 target : mir:: BasicBlock ,
130130 mergeable_succ : bool ,
@@ -153,7 +153,7 @@ impl<'a, 'tcx> TerminatorCodegenHelper<'tcx> {
153153 /// return destination `destination` and the unwind action `unwind`.
154154 fn do_call < Bx : BuilderMethods < ' a , ' tcx > > (
155155 & self ,
156- fx : & mut FunctionCx < ' a , ' tcx , Bx > ,
156+ fx : & mut FunctionCx < ' body , ' a , ' tcx , Bx > ,
157157 bx : & mut Bx ,
158158 fn_abi : & ' tcx FnAbi < ' tcx , Ty < ' tcx > > ,
159159 fn_ptr : Bx :: Value ,
@@ -272,7 +272,7 @@ impl<'a, 'tcx> TerminatorCodegenHelper<'tcx> {
272272 /// Generates inline assembly with optional `destination` and `unwind`.
273273 fn do_inlineasm < Bx : BuilderMethods < ' a , ' tcx > > (
274274 & self ,
275- fx : & mut FunctionCx < ' a , ' tcx , Bx > ,
275+ fx : & mut FunctionCx < ' body , ' a , ' tcx , Bx > ,
276276 bx : & mut Bx ,
277277 template : & [ InlineAsmTemplatePiece ] ,
278278 operands : & [ InlineAsmOperandRef < ' tcx , Bx > ] ,
@@ -339,9 +339,13 @@ impl<'a, 'tcx> TerminatorCodegenHelper<'tcx> {
339339}
340340
341341/// Codegen implementations for some terminator variants.
342- impl < ' a , ' tcx , Bx : BuilderMethods < ' a , ' tcx > > FunctionCx < ' a , ' tcx , Bx > {
342+ impl < ' body , ' a , ' tcx , Bx : BuilderMethods < ' a , ' tcx > > FunctionCx < ' body , ' a , ' tcx , Bx > {
343343 /// Generates code for a `Resume` terminator.
344- fn codegen_resume_terminator ( & mut self , helper : TerminatorCodegenHelper < ' tcx > , bx : & mut Bx ) {
344+ fn codegen_resume_terminator (
345+ & mut self ,
346+ helper : TerminatorCodegenHelper < ' body , ' tcx > ,
347+ bx : & mut Bx ,
348+ ) {
345349 if let Some ( funclet) = helper. funclet ( self ) {
346350 bx. cleanup_ret ( funclet, None ) ;
347351 } else {
@@ -358,7 +362,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
358362
359363 fn codegen_switchint_terminator (
360364 & mut self ,
361- helper : TerminatorCodegenHelper < ' tcx > ,
365+ helper : TerminatorCodegenHelper < ' body , ' tcx > ,
362366 bx : & mut Bx ,
363367 discr : & mir:: Operand < ' tcx > ,
364368 targets : & SwitchTargets ,
@@ -498,7 +502,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
498502 #[ tracing:: instrument( level = "trace" , skip( self , helper, bx) ) ]
499503 fn codegen_drop_terminator (
500504 & mut self ,
501- helper : TerminatorCodegenHelper < ' tcx > ,
505+ helper : TerminatorCodegenHelper < ' body , ' tcx > ,
502506 bx : & mut Bx ,
503507 source_info : & mir:: SourceInfo ,
504508 location : mir:: Place < ' tcx > ,
@@ -640,7 +644,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
640644
641645 fn codegen_assert_terminator (
642646 & mut self ,
643- helper : TerminatorCodegenHelper < ' tcx > ,
647+ helper : TerminatorCodegenHelper < ' body , ' tcx > ,
644648 bx : & mut Bx ,
645649 terminator : & mir:: Terminator < ' tcx > ,
646650 cond : & mir:: Operand < ' tcx > ,
@@ -719,7 +723,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
719723
720724 fn codegen_terminate_terminator (
721725 & mut self ,
722- helper : TerminatorCodegenHelper < ' tcx > ,
726+ helper : TerminatorCodegenHelper < ' body , ' tcx > ,
723727 bx : & mut Bx ,
724728 terminator : & mir:: Terminator < ' tcx > ,
725729 reason : UnwindTerminateReason ,
@@ -749,7 +753,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
749753 /// Returns `Some` if this is indeed a panic intrinsic and codegen is done.
750754 fn codegen_panic_intrinsic (
751755 & mut self ,
752- helper : & TerminatorCodegenHelper < ' tcx > ,
756+ helper : & TerminatorCodegenHelper < ' body , ' tcx > ,
753757 bx : & mut Bx ,
754758 intrinsic : Option < ty:: IntrinsicDef > ,
755759 instance : Option < Instance < ' tcx > > ,
@@ -818,7 +822,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
818822
819823 fn codegen_call_terminator (
820824 & mut self ,
821- helper : TerminatorCodegenHelper < ' tcx > ,
825+ helper : TerminatorCodegenHelper < ' body , ' tcx > ,
822826 bx : & mut Bx ,
823827 terminator : & mir:: Terminator < ' tcx > ,
824828 func : & mir:: Operand < ' tcx > ,
@@ -1170,7 +1174,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
11701174
11711175 fn codegen_asm_terminator (
11721176 & mut self ,
1173- helper : TerminatorCodegenHelper < ' tcx > ,
1177+ helper : TerminatorCodegenHelper < ' body , ' tcx > ,
11741178 bx : & mut Bx ,
11751179 terminator : & mir:: Terminator < ' tcx > ,
11761180 template : & [ ast:: InlineAsmTemplatePiece ] ,
@@ -1254,7 +1258,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
12541258 }
12551259}
12561260
1257- impl < ' a , ' tcx , Bx : BuilderMethods < ' a , ' tcx > > FunctionCx < ' a , ' tcx , Bx > {
1261+ impl < ' body , ' a , ' tcx , Bx : BuilderMethods < ' a , ' tcx > > FunctionCx < ' body , ' a , ' tcx , Bx > {
12581262 pub fn codegen_block ( & mut self , mut bb : mir:: BasicBlock ) {
12591263 let llbb = match self . try_llbb ( bb) {
12601264 Some ( llbb) => llbb,
@@ -1309,7 +1313,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
13091313 & mut self ,
13101314 bx : & mut Bx ,
13111315 bb : mir:: BasicBlock ,
1312- terminator : & ' tcx mir:: Terminator < ' tcx > ,
1316+ terminator : & ' body mir:: Terminator < ' tcx > ,
13131317 ) -> MergingSucc {
13141318 debug ! ( "codegen_terminator: {:?}" , terminator) ;
13151319
0 commit comments