@@ -196,13 +196,14 @@ fn build_drop_shim<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId, ty: Option<Ty<'tcx>>)
196
196
block ( & mut blocks, TerminatorKind :: Goto { target : return_block } ) ;
197
197
block ( & mut blocks, TerminatorKind :: Return ) ;
198
198
199
- let mut body = new_body ( blocks,
200
- IndexVec :: from_elem_n (
201
- SourceScopeData { span, parent_scope : None } , 1
202
- ) ,
203
- local_decls_for_sig ( & sig, span) ,
204
- sig. inputs ( ) . len ( ) ,
205
- span) ;
199
+ let mut body = new_body (
200
+ blocks,
201
+ IndexVec :: from_elem_n (
202
+ SourceScopeData { span, parent_scope : None } , 1
203
+ ) ,
204
+ local_decls_for_sig ( & sig, span) ,
205
+ sig. inputs ( ) . len ( ) ,
206
+ span) ;
206
207
207
208
if let Some ( ..) = ty {
208
209
// The first argument (index 0), but add 1 for the return value.
@@ -241,11 +242,12 @@ fn build_drop_shim<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId, ty: Option<Ty<'tcx>>)
241
242
body
242
243
}
243
244
244
- fn new_body < ' tcx > ( basic_blocks : IndexVec < BasicBlock , BasicBlockData < ' tcx > > ,
245
- source_scopes : IndexVec < SourceScope , SourceScopeData > ,
246
- local_decls : IndexVec < Local , LocalDecl < ' tcx > > ,
247
- arg_count : usize ,
248
- span : Span ,
245
+ fn new_body < ' tcx > (
246
+ basic_blocks : IndexVec < BasicBlock , BasicBlockData < ' tcx > > ,
247
+ source_scopes : IndexVec < SourceScope , SourceScopeData > ,
248
+ local_decls : IndexVec < Local , LocalDecl < ' tcx > > ,
249
+ arg_count : usize ,
250
+ span : Span ,
249
251
) -> Body < ' tcx > {
250
252
Body :: new (
251
253
basic_blocks,
@@ -377,13 +379,14 @@ impl CloneShimBuilder<'tcx> {
377
379
}
378
380
379
381
fn into_mir ( self ) -> Body < ' tcx > {
380
- new_body ( self . blocks ,
381
- IndexVec :: from_elem_n (
382
- SourceScopeData { span : self . span , parent_scope : None } , 1
383
- ) ,
384
- self . local_decls ,
385
- self . sig . inputs ( ) . len ( ) ,
386
- self . span ,
382
+ new_body (
383
+ self . blocks ,
384
+ IndexVec :: from_elem_n (
385
+ SourceScopeData { span : self . span , parent_scope : None } , 1
386
+ ) ,
387
+ self . local_decls ,
388
+ self . sig . inputs ( ) . len ( ) ,
389
+ self . span ,
387
390
)
388
391
}
389
392
0 commit comments