@@ -168,7 +168,6 @@ pub fn compile_input(
168
168
let ExpansionResult {
169
169
expanded_crate,
170
170
defs,
171
- analysis,
172
171
resolutions,
173
172
mut hir_forest,
174
173
} = {
@@ -251,7 +250,6 @@ pub fn compile_input(
251
250
output,
252
251
& cstore,
253
252
& hir_map,
254
- & analysis,
255
253
& resolutions,
256
254
& expanded_crate,
257
255
& hir_map. krate( ) ,
@@ -277,12 +275,11 @@ pub fn compile_input(
277
275
sess,
278
276
cstore,
279
277
hir_map,
280
- analysis,
281
278
resolutions,
282
279
& mut arenas,
283
280
& crate_name,
284
281
& outputs,
285
- |tcx, analysis , rx, result| {
282
+ |tcx, rx, result| {
286
283
{
287
284
// Eventually, we will want to track plugins.
288
285
tcx. dep_graph . with_ignore ( || {
@@ -293,7 +290,6 @@ pub fn compile_input(
293
290
output,
294
291
opt_crate,
295
292
tcx. hir ( ) . krate ( ) ,
296
- & analysis,
297
293
tcx,
298
294
& crate_name,
299
295
) ;
@@ -527,7 +523,6 @@ pub struct CompileState<'a, 'tcx: 'a> {
527
523
pub hir_crate : Option < & ' a hir:: Crate > ,
528
524
pub hir_map : Option < & ' a hir_map:: Map < ' tcx > > ,
529
525
pub resolutions : Option < & ' a Resolutions > ,
530
- pub analysis : Option < & ' a ty:: CrateAnalysis > ,
531
526
pub tcx : Option < TyCtxt < ' a , ' tcx , ' tcx > > ,
532
527
}
533
528
@@ -547,7 +542,6 @@ impl<'a, 'tcx> CompileState<'a, 'tcx> {
547
542
hir_crate : None ,
548
543
hir_map : None ,
549
544
resolutions : None ,
550
- analysis : None ,
551
545
tcx : None ,
552
546
}
553
547
}
@@ -595,7 +589,6 @@ impl<'a, 'tcx> CompileState<'a, 'tcx> {
595
589
out_file : & ' a Option < PathBuf > ,
596
590
cstore : & ' tcx CStore ,
597
591
hir_map : & ' a hir_map:: Map < ' tcx > ,
598
- analysis : & ' a ty:: CrateAnalysis ,
599
592
resolutions : & ' a Resolutions ,
600
593
krate : & ' a ast:: Crate ,
601
594
hir_crate : & ' a hir:: Crate ,
@@ -606,7 +599,6 @@ impl<'a, 'tcx> CompileState<'a, 'tcx> {
606
599
crate_name : Some ( crate_name) ,
607
600
cstore : Some ( cstore) ,
608
601
hir_map : Some ( hir_map) ,
609
- analysis : Some ( analysis) ,
610
602
resolutions : Some ( resolutions) ,
611
603
expanded_crate : Some ( krate) ,
612
604
hir_crate : Some ( hir_crate) ,
@@ -623,12 +615,10 @@ impl<'a, 'tcx> CompileState<'a, 'tcx> {
623
615
out_file : & ' a Option < PathBuf > ,
624
616
krate : Option < & ' a ast:: Crate > ,
625
617
hir_crate : & ' a hir:: Crate ,
626
- analysis : & ' a ty:: CrateAnalysis ,
627
618
tcx : TyCtxt < ' a , ' tcx , ' tcx > ,
628
619
crate_name : & ' a str ,
629
620
) -> Self {
630
621
CompileState {
631
- analysis : Some ( analysis) ,
632
622
tcx : Some ( tcx) ,
633
623
expanded_crate : krate,
634
624
hir_crate : Some ( hir_crate) ,
@@ -711,7 +701,6 @@ fn count_nodes(krate: &ast::Crate) -> usize {
711
701
pub struct ExpansionResult {
712
702
pub expanded_crate : ast:: Crate ,
713
703
pub defs : hir_map:: Definitions ,
714
- pub analysis : ty:: CrateAnalysis ,
715
704
pub resolutions : Resolutions ,
716
705
pub hir_forest : hir_map:: Forest ,
717
706
}
@@ -772,16 +761,13 @@ where
772
761
freevars : resolver. freevars ,
773
762
export_map : resolver. export_map ,
774
763
trait_map : resolver. trait_map ,
764
+ glob_map : resolver. glob_map ,
775
765
maybe_unused_trait_imports : resolver. maybe_unused_trait_imports ,
776
766
maybe_unused_extern_crates : resolver. maybe_unused_extern_crates ,
777
767
extern_prelude : resolver. extern_prelude . iter ( ) . map ( |( ident, entry) | {
778
768
( ident. name , entry. introduced_by_item )
779
769
} ) . collect ( ) ,
780
770
} ,
781
-
782
- analysis : ty:: CrateAnalysis {
783
- glob_map : resolver. glob_map
784
- } ,
785
771
} ) ,
786
772
Err ( x) => Err ( x) ,
787
773
}
@@ -1180,7 +1166,6 @@ pub fn phase_3_run_analysis_passes<'tcx, F, R>(
1180
1166
sess : & ' tcx Session ,
1181
1167
cstore : & ' tcx CStore ,
1182
1168
hir_map : hir_map:: Map < ' tcx > ,
1183
- analysis : ty:: CrateAnalysis ,
1184
1169
resolutions : Resolutions ,
1185
1170
arenas : & ' tcx mut AllArenas < ' tcx > ,
1186
1171
name : & str ,
@@ -1190,7 +1175,6 @@ pub fn phase_3_run_analysis_passes<'tcx, F, R>(
1190
1175
where
1191
1176
F : for < ' a > FnOnce (
1192
1177
TyCtxt < ' a , ' tcx , ' tcx > ,
1193
- ty:: CrateAnalysis ,
1194
1178
mpsc:: Receiver < Box < dyn Any + Send > > ,
1195
1179
CompileResult ,
1196
1180
) -> R ,
@@ -1254,7 +1238,7 @@ where
1254
1238
match typeck:: check_crate ( tcx) {
1255
1239
Ok ( x) => x,
1256
1240
Err ( x) => {
1257
- f ( tcx, analysis , rx, Err ( x) ) ;
1241
+ f ( tcx, rx, Err ( x) ) ;
1258
1242
return Err ( x) ;
1259
1243
}
1260
1244
}
@@ -1307,7 +1291,7 @@ where
1307
1291
// lint warnings and so on -- kindck used to do this abort, but
1308
1292
// kindck is gone now). -nmatsakis
1309
1293
if sess. err_count ( ) > 0 {
1310
- return Ok ( f ( tcx, analysis , rx, sess. compile_status ( ) ) ) ;
1294
+ return Ok ( f ( tcx, rx, sess. compile_status ( ) ) ) ;
1311
1295
}
1312
1296
1313
1297
time ( sess, "death checking" , || middle:: dead:: check_crate ( tcx) ) ;
@@ -1318,7 +1302,7 @@ where
1318
1302
1319
1303
time ( sess, "lint checking" , || lint:: check_crate ( tcx) ) ;
1320
1304
1321
- return Ok ( f ( tcx, analysis , rx, tcx. sess . compile_status ( ) ) ) ;
1305
+ return Ok ( f ( tcx, rx, tcx. sess . compile_status ( ) ) ) ;
1322
1306
} ,
1323
1307
)
1324
1308
}
0 commit comments