@@ -10,7 +10,6 @@ use rustc_middle::mir::*;
10
10
use rustc_middle:: ty:: TypeVisitableExt ;
11
11
use rustc_middle:: ty:: { self , Instance , InstanceDef , ParamEnv , Ty , TyCtxt } ;
12
12
use rustc_session:: config:: OptLevel ;
13
- use rustc_span:: { hygiene:: ExpnKind , ExpnData , LocalExpnId , Span } ;
14
13
use rustc_target:: abi:: { FieldIdx , FIRST_VARIANT } ;
15
14
use rustc_target:: spec:: abi:: Abi ;
16
15
@@ -551,16 +550,6 @@ impl<'tcx> Inliner<'tcx> {
551
550
// Copy the arguments if needed.
552
551
let args: Vec < _ > = self . make_call_args ( args, & callsite, caller_body, & callee_body) ;
553
552
554
- let mut expn_data = ExpnData :: default (
555
- ExpnKind :: Inlined ,
556
- callsite. source_info . span ,
557
- self . tcx . sess . edition ( ) ,
558
- None ,
559
- None ,
560
- ) ;
561
- expn_data. def_site = callee_body. span ;
562
- let expn_data =
563
- self . tcx . with_stable_hashing_context ( |hcx| LocalExpnId :: fresh ( expn_data, hcx) ) ;
564
553
let mut integrator = Integrator {
565
554
args : & args,
566
555
new_locals : Local :: new ( caller_body. local_decls . len ( ) ) ..,
@@ -572,7 +561,6 @@ impl<'tcx> Inliner<'tcx> {
572
561
cleanup_block : unwind,
573
562
in_cleanup_block : false ,
574
563
tcx : self . tcx ,
575
- expn_data,
576
564
always_live_locals : BitSet :: new_filled ( callee_body. local_decls . len ( ) ) ,
577
565
} ;
578
566
@@ -956,7 +944,6 @@ struct Integrator<'a, 'tcx> {
956
944
cleanup_block : UnwindAction ,
957
945
in_cleanup_block : bool ,
958
946
tcx : TyCtxt < ' tcx > ,
959
- expn_data : LocalExpnId ,
960
947
always_live_locals : BitSet < Local > ,
961
948
}
962
949
@@ -1042,11 +1029,6 @@ impl<'tcx> MutVisitor<'tcx> for Integrator<'_, 'tcx> {
1042
1029
* scope = self . map_scope ( * scope) ;
1043
1030
}
1044
1031
1045
- fn visit_span ( & mut self , span : & mut Span ) {
1046
- // Make sure that all spans track the fact that they were inlined.
1047
- * span = span. fresh_expansion ( self . expn_data ) ;
1048
- }
1049
-
1050
1032
fn visit_basic_block_data ( & mut self , block : BasicBlock , data : & mut BasicBlockData < ' tcx > ) {
1051
1033
self . in_cleanup_block = data. is_cleanup ;
1052
1034
self . super_basic_block_data ( block, data) ;
0 commit comments