@@ -14,6 +14,7 @@ pub use self::code_stats::{SizeKind, TypeSizeInfo, VariantInfo};
1414use hir:: def_id:: { CrateNum , DefIndex } ;
1515use ich:: Fingerprint ;
1616
17+ use ich;
1718use lint;
1819use middle:: allocator:: AllocatorKind ;
1920use middle:: dependency_format;
@@ -22,6 +23,7 @@ use session::config::DebugInfoLevel;
2223use ty:: tls;
2324use util:: nodemap:: { FxHashMap , FxHashSet } ;
2425use util:: common:: { duration_to_secs_str, ErrorReported } ;
26+ use util:: common:: ProfileQueriesMsg ;
2527
2628use rustc_data_structures:: sync:: { Lrc , RwLock , Lock , LockCell , ReadGuard } ;
2729
@@ -30,6 +32,7 @@ use errors::{self, DiagnosticBuilder, DiagnosticId};
3032use errors:: emitter:: { EmitterDyn , EmitterWriter } ;
3133use syntax:: json:: JsonEmitter ;
3234use syntax:: feature_gate;
35+ use syntax:: symbol:: Symbol ;
3336use syntax:: parse;
3437use syntax:: parse:: ParseSess ;
3538use syntax:: { ast, codemap} ;
@@ -48,6 +51,7 @@ use std::io::Write;
4851use std:: path:: { Path , PathBuf } ;
4952use std:: sync:: { Once , ONCE_INIT } ;
5053use std:: time:: Duration ;
54+ use std:: sync:: mpsc;
5155
5256mod code_stats;
5357pub mod config;
@@ -112,6 +116,12 @@ pub struct Session {
112116
113117 incr_comp_session : RwLock < IncrCompSession > ,
114118
119+ /// A cache of attributes ignored by StableHashingContext
120+ pub ignored_attr_names : FxHashSet < Symbol > ,
121+
122+ /// Used by -Z profile-queries in util::common
123+ pub profile_channel : Lock < Option < mpsc:: Sender < ProfileQueriesMsg > > > ,
124+
115125 /// Some measurements that are being gathered during compilation.
116126 pub perf_stats : PerfStats ,
117127
@@ -832,6 +842,8 @@ pub fn build_session_(sopts: config::Options,
832842 injected_panic_runtime : LockCell :: new ( None ) ,
833843 imported_macro_spans : Lock :: new ( HashMap :: new ( ) ) ,
834844 incr_comp_session : RwLock :: new ( IncrCompSession :: NotInitialized ) ,
845+ ignored_attr_names : ich:: compute_ignored_attr_names ( ) ,
846+ profile_channel : Lock :: new ( None ) ,
835847 perf_stats : PerfStats {
836848 svh_time : LockCell :: new ( Duration :: from_secs ( 0 ) ) ,
837849 incr_comp_hashes_time : LockCell :: new ( Duration :: from_secs ( 0 ) ) ,
0 commit comments