@@ -35,7 +35,7 @@ struct CallSite<'tcx> {
35
35
callee : DefId ,
36
36
substs : SubstsRef < ' tcx > ,
37
37
bb : BasicBlock ,
38
- location : SourceInfo ,
38
+ source_info : SourceInfo ,
39
39
}
40
40
41
41
impl < ' tcx > MirPass < ' tcx > for Inline {
@@ -196,7 +196,7 @@ impl Inliner<'tcx> {
196
196
callee : instance. def_id ( ) ,
197
197
substs : instance. substs ,
198
198
bb,
199
- location : terminator. source_info ,
199
+ source_info : terminator. source_info ,
200
200
} ) ;
201
201
}
202
202
}
@@ -415,7 +415,7 @@ impl Inliner<'tcx> {
415
415
416
416
for mut scope in callee_body. source_scopes . iter ( ) . cloned ( ) {
417
417
if scope. parent_scope . is_none ( ) {
418
- scope. parent_scope = Some ( callsite. location . scope ) ;
418
+ scope. parent_scope = Some ( callsite. source_info . scope ) ;
419
419
// FIXME(eddyb) is this really needed?
420
420
// (also note that it's always overwritten below)
421
421
scope. span = callee_body. span ;
@@ -424,7 +424,7 @@ impl Inliner<'tcx> {
424
424
// FIXME(eddyb) this doesn't seem right at all.
425
425
// The inlined source scopes should probably be annotated as
426
426
// such, but also contain all of the original information.
427
- scope. span = callsite. location . span ;
427
+ scope. span = callsite. source_info . span ;
428
428
429
429
let idx = caller_body. source_scopes . push ( scope) ;
430
430
scope_map. push ( idx) ;
@@ -434,7 +434,7 @@ impl Inliner<'tcx> {
434
434
let mut local = callee_body. local_decls [ loc] . clone ( ) ;
435
435
436
436
local. source_info . scope = scope_map[ local. source_info . scope ] ;
437
- local. source_info . span = callsite. location . span ;
437
+ local. source_info . span = callsite. source_info . span ;
438
438
439
439
let idx = caller_body. local_decls . push ( local) ;
440
440
local_map. push ( idx) ;
@@ -466,13 +466,13 @@ impl Inliner<'tcx> {
466
466
467
467
let ty = dest. ty ( & * * caller_body, self . tcx ) ;
468
468
469
- let temp = LocalDecl :: new_temp ( ty, callsite. location . span ) ;
469
+ let temp = LocalDecl :: new_temp ( ty, callsite. source_info . span ) ;
470
470
471
471
let tmp = caller_body. local_decls . push ( temp) ;
472
472
let tmp = Place :: from ( tmp) ;
473
473
474
474
let stmt = Statement {
475
- source_info : callsite. location ,
475
+ source_info : callsite. source_info ,
476
476
kind : StatementKind :: Assign ( box ( tmp, dest) ) ,
477
477
} ;
478
478
caller_body[ callsite. bb ] . statements . push ( stmt) ;
@@ -510,7 +510,7 @@ impl Inliner<'tcx> {
510
510
}
511
511
512
512
let terminator = Terminator {
513
- source_info : callsite. location ,
513
+ source_info : callsite. source_info ,
514
514
kind : TerminatorKind :: Goto { target : BasicBlock :: new ( bb_len) } ,
515
515
} ;
516
516
@@ -617,11 +617,11 @@ impl Inliner<'tcx> {
617
617
618
618
let ty = arg. ty ( & * * caller_body, self . tcx ) ;
619
619
620
- let arg_tmp = LocalDecl :: new_temp ( ty, callsite. location . span ) ;
620
+ let arg_tmp = LocalDecl :: new_temp ( ty, callsite. source_info . span ) ;
621
621
let arg_tmp = caller_body. local_decls . push ( arg_tmp) ;
622
622
623
623
let stmt = Statement {
624
- source_info : callsite. location ,
624
+ source_info : callsite. source_info ,
625
625
kind : StatementKind :: Assign ( box ( Place :: from ( arg_tmp) , arg) ) ,
626
626
} ;
627
627
caller_body[ callsite. bb ] . statements . push ( stmt) ;
0 commit comments