@@ -21,7 +21,7 @@ use rustc::middle::{self, dependency_format, stability, reachable};
21
21
use rustc:: middle:: privacy:: AccessLevels ;
22
22
use rustc:: ty:: { self , TyCtxt , Resolutions , GlobalArenas } ;
23
23
use rustc:: util:: common:: time;
24
- use rustc:: util:: nodemap:: { NodeSet , NodeMap } ;
24
+ use rustc:: util:: nodemap:: NodeSet ;
25
25
use rustc:: util:: fs:: rename_or_copy_remove;
26
26
use rustc_borrowck as borrowck;
27
27
use rustc_incremental:: { self , IncrementalHashesMap } ;
@@ -343,7 +343,7 @@ pub struct CompileState<'a, 'tcx: 'a> {
343
343
pub hir_crate : Option < & ' a hir:: Crate > ,
344
344
pub hir_map : Option < & ' a hir_map:: Map < ' tcx > > ,
345
345
pub resolutions : Option < & ' a Resolutions > ,
346
- pub analysis : Option < & ' a ty:: CrateAnalysis < ' tcx > > ,
346
+ pub analysis : Option < & ' a ty:: CrateAnalysis > ,
347
347
pub tcx : Option < TyCtxt < ' a , ' tcx , ' tcx > > ,
348
348
pub trans : Option < & ' a trans:: CrateTranslation > ,
349
349
}
@@ -417,7 +417,7 @@ impl<'a, 'tcx> CompileState<'a, 'tcx> {
417
417
arenas : & ' tcx GlobalArenas < ' tcx > ,
418
418
cstore : & ' a CStore ,
419
419
hir_map : & ' a hir_map:: Map < ' tcx > ,
420
- analysis : & ' a ty:: CrateAnalysis < ' static > ,
420
+ analysis : & ' a ty:: CrateAnalysis ,
421
421
resolutions : & ' a Resolutions ,
422
422
krate : & ' a ast:: Crate ,
423
423
hir_crate : & ' a hir:: Crate ,
@@ -444,7 +444,7 @@ impl<'a, 'tcx> CompileState<'a, 'tcx> {
444
444
out_file : & ' a Option < PathBuf > ,
445
445
krate : Option < & ' a ast:: Crate > ,
446
446
hir_crate : & ' a hir:: Crate ,
447
- analysis : & ' a ty:: CrateAnalysis < ' tcx > ,
447
+ analysis : & ' a ty:: CrateAnalysis ,
448
448
tcx : TyCtxt < ' a , ' tcx , ' tcx > ,
449
449
crate_name : & ' a str )
450
450
-> Self {
@@ -534,7 +534,7 @@ fn count_nodes(krate: &ast::Crate) -> usize {
534
534
pub struct ExpansionResult {
535
535
pub expanded_crate : ast:: Crate ,
536
536
pub defs : hir_map:: Definitions ,
537
- pub analysis : ty:: CrateAnalysis < ' static > ,
537
+ pub analysis : ty:: CrateAnalysis ,
538
538
pub resolutions : Resolutions ,
539
539
pub hir_forest : hir_map:: Forest ,
540
540
}
@@ -797,7 +797,6 @@ pub fn phase_2_configure_and_expand<F>(sess: &Session,
797
797
reachable : NodeSet ( ) ,
798
798
name : crate_name. to_string ( ) ,
799
799
glob_map : if resolver. make_glob_map { Some ( resolver. glob_map ) } else { None } ,
800
- hir_ty_to_ty : NodeMap ( ) ,
801
800
} ,
802
801
resolutions : Resolutions {
803
802
freevars : resolver. freevars ,
@@ -813,15 +812,15 @@ pub fn phase_2_configure_and_expand<F>(sess: &Session,
813
812
/// structures carrying the results of the analysis.
814
813
pub fn phase_3_run_analysis_passes < ' tcx , F , R > ( sess : & ' tcx Session ,
815
814
hir_map : hir_map:: Map < ' tcx > ,
816
- mut analysis : ty:: CrateAnalysis < ' tcx > ,
815
+ mut analysis : ty:: CrateAnalysis ,
817
816
resolutions : Resolutions ,
818
817
arena : & ' tcx DroplessArena ,
819
818
arenas : & ' tcx GlobalArenas < ' tcx > ,
820
819
name : & str ,
821
820
f : F )
822
821
-> Result < R , usize >
823
822
where F : for < ' a > FnOnce ( TyCtxt < ' a , ' tcx , ' tcx > ,
824
- ty:: CrateAnalysis < ' tcx > ,
823
+ ty:: CrateAnalysis ,
825
824
IncrementalHashesMap ,
826
825
CompileResult ) -> R
827
826
{
@@ -908,8 +907,7 @@ pub fn phase_3_run_analysis_passes<'tcx, F, R>(sess: &'tcx Session,
908
907
|| stability:: check_unstable_api_usage ( tcx) ) ;
909
908
910
909
// passes are timed inside typeck
911
- analysis. hir_ty_to_ty =
912
- try_with_f ! ( typeck:: check_crate( tcx) , ( tcx, analysis, incremental_hashes_map) ) ;
910
+ try_with_f ! ( typeck:: check_crate( tcx) , ( tcx, analysis, incremental_hashes_map) ) ;
913
911
914
912
time ( time_passes,
915
913
"const checking" ,
0 commit comments