@@ -168,7 +168,6 @@ pub fn compile_input(
168168 let ExpansionResult {
169169 expanded_crate,
170170 defs,
171- analysis,
172171 resolutions,
173172 mut hir_forest,
174173 } = {
@@ -251,7 +250,6 @@ pub fn compile_input(
251250 output,
252251 & cstore,
253252 & hir_map,
254- & analysis,
255253 & resolutions,
256254 & expanded_crate,
257255 & hir_map. krate( ) ,
@@ -277,12 +275,11 @@ pub fn compile_input(
277275 sess,
278276 cstore,
279277 hir_map,
280- analysis,
281278 resolutions,
282279 & mut arenas,
283280 & crate_name,
284281 & outputs,
285- |tcx, analysis , rx, result| {
282+ |tcx, rx, result| {
286283 {
287284 // Eventually, we will want to track plugins.
288285 tcx. dep_graph . with_ignore ( || {
@@ -293,7 +290,6 @@ pub fn compile_input(
293290 output,
294291 opt_crate,
295292 tcx. hir ( ) . krate ( ) ,
296- & analysis,
297293 tcx,
298294 & crate_name,
299295 ) ;
@@ -527,7 +523,6 @@ pub struct CompileState<'a, 'tcx: 'a> {
527523 pub hir_crate : Option < & ' a hir:: Crate > ,
528524 pub hir_map : Option < & ' a hir_map:: Map < ' tcx > > ,
529525 pub resolutions : Option < & ' a Resolutions > ,
530- pub analysis : Option < & ' a ty:: CrateAnalysis > ,
531526 pub tcx : Option < TyCtxt < ' a , ' tcx , ' tcx > > ,
532527}
533528
@@ -547,7 +542,6 @@ impl<'a, 'tcx> CompileState<'a, 'tcx> {
547542 hir_crate : None ,
548543 hir_map : None ,
549544 resolutions : None ,
550- analysis : None ,
551545 tcx : None ,
552546 }
553547 }
@@ -595,7 +589,6 @@ impl<'a, 'tcx> CompileState<'a, 'tcx> {
595589 out_file : & ' a Option < PathBuf > ,
596590 cstore : & ' tcx CStore ,
597591 hir_map : & ' a hir_map:: Map < ' tcx > ,
598- analysis : & ' a ty:: CrateAnalysis ,
599592 resolutions : & ' a Resolutions ,
600593 krate : & ' a ast:: Crate ,
601594 hir_crate : & ' a hir:: Crate ,
@@ -606,7 +599,6 @@ impl<'a, 'tcx> CompileState<'a, 'tcx> {
606599 crate_name : Some ( crate_name) ,
607600 cstore : Some ( cstore) ,
608601 hir_map : Some ( hir_map) ,
609- analysis : Some ( analysis) ,
610602 resolutions : Some ( resolutions) ,
611603 expanded_crate : Some ( krate) ,
612604 hir_crate : Some ( hir_crate) ,
@@ -623,12 +615,10 @@ impl<'a, 'tcx> CompileState<'a, 'tcx> {
623615 out_file : & ' a Option < PathBuf > ,
624616 krate : Option < & ' a ast:: Crate > ,
625617 hir_crate : & ' a hir:: Crate ,
626- analysis : & ' a ty:: CrateAnalysis ,
627618 tcx : TyCtxt < ' a , ' tcx , ' tcx > ,
628619 crate_name : & ' a str ,
629620 ) -> Self {
630621 CompileState {
631- analysis : Some ( analysis) ,
632622 tcx : Some ( tcx) ,
633623 expanded_crate : krate,
634624 hir_crate : Some ( hir_crate) ,
@@ -711,7 +701,6 @@ fn count_nodes(krate: &ast::Crate) -> usize {
711701pub struct ExpansionResult {
712702 pub expanded_crate : ast:: Crate ,
713703 pub defs : hir_map:: Definitions ,
714- pub analysis : ty:: CrateAnalysis ,
715704 pub resolutions : Resolutions ,
716705 pub hir_forest : hir_map:: Forest ,
717706}
@@ -772,16 +761,13 @@ where
772761 freevars : resolver. freevars ,
773762 export_map : resolver. export_map ,
774763 trait_map : resolver. trait_map ,
764+ glob_map : resolver. glob_map ,
775765 maybe_unused_trait_imports : resolver. maybe_unused_trait_imports ,
776766 maybe_unused_extern_crates : resolver. maybe_unused_extern_crates ,
777767 extern_prelude : resolver. extern_prelude . iter ( ) . map ( |( ident, entry) | {
778768 ( ident. name , entry. introduced_by_item )
779769 } ) . collect ( ) ,
780770 } ,
781-
782- analysis : ty:: CrateAnalysis {
783- glob_map : resolver. glob_map
784- } ,
785771 } ) ,
786772 Err ( x) => Err ( x) ,
787773 }
@@ -1180,7 +1166,6 @@ pub fn phase_3_run_analysis_passes<'tcx, F, R>(
11801166 sess : & ' tcx Session ,
11811167 cstore : & ' tcx CStore ,
11821168 hir_map : hir_map:: Map < ' tcx > ,
1183- analysis : ty:: CrateAnalysis ,
11841169 resolutions : Resolutions ,
11851170 arenas : & ' tcx mut AllArenas < ' tcx > ,
11861171 name : & str ,
@@ -1190,7 +1175,6 @@ pub fn phase_3_run_analysis_passes<'tcx, F, R>(
11901175where
11911176 F : for < ' a > FnOnce (
11921177 TyCtxt < ' a , ' tcx , ' tcx > ,
1193- ty:: CrateAnalysis ,
11941178 mpsc:: Receiver < Box < dyn Any + Send > > ,
11951179 CompileResult ,
11961180 ) -> R ,
@@ -1254,7 +1238,7 @@ where
12541238 match typeck:: check_crate ( tcx) {
12551239 Ok ( x) => x,
12561240 Err ( x) => {
1257- f ( tcx, analysis , rx, Err ( x) ) ;
1241+ f ( tcx, rx, Err ( x) ) ;
12581242 return Err ( x) ;
12591243 }
12601244 }
@@ -1307,7 +1291,7 @@ where
13071291 // lint warnings and so on -- kindck used to do this abort, but
13081292 // kindck is gone now). -nmatsakis
13091293 if sess. err_count ( ) > 0 {
1310- return Ok ( f ( tcx, analysis , rx, sess. compile_status ( ) ) ) ;
1294+ return Ok ( f ( tcx, rx, sess. compile_status ( ) ) ) ;
13111295 }
13121296
13131297 time ( sess, "death checking" , || middle:: dead:: check_crate ( tcx) ) ;
@@ -1318,7 +1302,7 @@ where
13181302
13191303 time ( sess, "lint checking" , || lint:: check_crate ( tcx) ) ;
13201304
1321- return Ok ( f ( tcx, analysis , rx, tcx. sess . compile_status ( ) ) ) ;
1305+ return Ok ( f ( tcx, rx, tcx. sess . compile_status ( ) ) ) ;
13221306 } ,
13231307 )
13241308}
0 commit comments