@@ -35,7 +35,7 @@ struct CallSite<'tcx> {
3535 callee : DefId ,
3636 substs : SubstsRef < ' tcx > ,
3737 bb : BasicBlock ,
38- location : SourceInfo ,
38+ source_info : SourceInfo ,
3939}
4040
4141impl < ' tcx > MirPass < ' tcx > for Inline {
@@ -196,7 +196,7 @@ impl Inliner<'tcx> {
196196 callee : instance. def_id ( ) ,
197197 substs : instance. substs ,
198198 bb,
199- location : terminator. source_info ,
199+ source_info : terminator. source_info ,
200200 } ) ;
201201 }
202202 }
@@ -415,7 +415,7 @@ impl Inliner<'tcx> {
415415
416416 for mut scope in callee_body. source_scopes . iter ( ) . cloned ( ) {
417417 if scope. parent_scope . is_none ( ) {
418- scope. parent_scope = Some ( callsite. location . scope ) ;
418+ scope. parent_scope = Some ( callsite. source_info . scope ) ;
419419 // FIXME(eddyb) is this really needed?
420420 // (also note that it's always overwritten below)
421421 scope. span = callee_body. span ;
@@ -424,7 +424,7 @@ impl Inliner<'tcx> {
424424 // FIXME(eddyb) this doesn't seem right at all.
425425 // The inlined source scopes should probably be annotated as
426426 // such, but also contain all of the original information.
427- scope. span = callsite. location . span ;
427+ scope. span = callsite. source_info . span ;
428428
429429 let idx = caller_body. source_scopes . push ( scope) ;
430430 scope_map. push ( idx) ;
@@ -434,7 +434,7 @@ impl Inliner<'tcx> {
434434 let mut local = callee_body. local_decls [ loc] . clone ( ) ;
435435
436436 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 ;
438438
439439 let idx = caller_body. local_decls . push ( local) ;
440440 local_map. push ( idx) ;
@@ -466,13 +466,13 @@ impl Inliner<'tcx> {
466466
467467 let ty = dest. ty ( & * * caller_body, self . tcx ) ;
468468
469- let temp = LocalDecl :: new_temp ( ty, callsite. location . span ) ;
469+ let temp = LocalDecl :: new_temp ( ty, callsite. source_info . span ) ;
470470
471471 let tmp = caller_body. local_decls . push ( temp) ;
472472 let tmp = Place :: from ( tmp) ;
473473
474474 let stmt = Statement {
475- source_info : callsite. location ,
475+ source_info : callsite. source_info ,
476476 kind : StatementKind :: Assign ( box ( tmp, dest) ) ,
477477 } ;
478478 caller_body[ callsite. bb ] . statements . push ( stmt) ;
@@ -510,7 +510,7 @@ impl Inliner<'tcx> {
510510 }
511511
512512 let terminator = Terminator {
513- source_info : callsite. location ,
513+ source_info : callsite. source_info ,
514514 kind : TerminatorKind :: Goto { target : BasicBlock :: new ( bb_len) } ,
515515 } ;
516516
@@ -617,11 +617,11 @@ impl Inliner<'tcx> {
617617
618618 let ty = arg. ty ( & * * caller_body, self . tcx ) ;
619619
620- let arg_tmp = LocalDecl :: new_temp ( ty, callsite. location . span ) ;
620+ let arg_tmp = LocalDecl :: new_temp ( ty, callsite. source_info . span ) ;
621621 let arg_tmp = caller_body. local_decls . push ( arg_tmp) ;
622622
623623 let stmt = Statement {
624- source_info : callsite. location ,
624+ source_info : callsite. source_info ,
625625 kind : StatementKind :: Assign ( box ( Place :: from ( arg_tmp) , arg) ) ,
626626 } ;
627627 caller_body[ callsite. bb ] . statements . push ( stmt) ;
0 commit comments