@@ -14,6 +14,7 @@ pub use self::code_stats::{SizeKind, TypeSizeInfo, VariantInfo};
14
14
use hir:: def_id:: { CrateNum , DefIndex } ;
15
15
use ich:: Fingerprint ;
16
16
17
+ use ich;
17
18
use lint;
18
19
use middle:: allocator:: AllocatorKind ;
19
20
use middle:: dependency_format;
@@ -22,6 +23,7 @@ use session::config::DebugInfoLevel;
22
23
use ty:: tls;
23
24
use util:: nodemap:: { FxHashMap , FxHashSet } ;
24
25
use util:: common:: { duration_to_secs_str, ErrorReported } ;
26
+ use util:: common:: ProfileQueriesMsg ;
25
27
26
28
use rustc_data_structures:: sync:: { Lrc , RwLock , Lock , LockCell , ReadGuard } ;
27
29
@@ -30,6 +32,7 @@ use errors::{self, DiagnosticBuilder, DiagnosticId};
30
32
use errors:: emitter:: { EmitterDyn , EmitterWriter } ;
31
33
use syntax:: json:: JsonEmitter ;
32
34
use syntax:: feature_gate;
35
+ use syntax:: symbol:: Symbol ;
33
36
use syntax:: parse;
34
37
use syntax:: parse:: ParseSess ;
35
38
use syntax:: { ast, codemap} ;
@@ -48,6 +51,7 @@ use std::io::Write;
48
51
use std:: path:: { Path , PathBuf } ;
49
52
use std:: sync:: { Once , ONCE_INIT } ;
50
53
use std:: time:: Duration ;
54
+ use std:: sync:: mpsc;
51
55
52
56
mod code_stats;
53
57
pub mod config;
@@ -112,6 +116,12 @@ pub struct Session {
112
116
113
117
incr_comp_session : RwLock < IncrCompSession > ,
114
118
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
+
115
125
/// Some measurements that are being gathered during compilation.
116
126
pub perf_stats : PerfStats ,
117
127
@@ -832,6 +842,8 @@ pub fn build_session_(sopts: config::Options,
832
842
injected_panic_runtime : LockCell :: new ( None ) ,
833
843
imported_macro_spans : Lock :: new ( HashMap :: new ( ) ) ,
834
844
incr_comp_session : RwLock :: new ( IncrCompSession :: NotInitialized ) ,
845
+ ignored_attr_names : ich:: compute_ignored_attr_names ( ) ,
846
+ profile_channel : Lock :: new ( None ) ,
835
847
perf_stats : PerfStats {
836
848
svh_time : LockCell :: new ( Duration :: from_secs ( 0 ) ) ,
837
849
incr_comp_hashes_time : LockCell :: new ( Duration :: from_secs ( 0 ) ) ,
0 commit comments