@@ -12,16 +12,14 @@ pub use self::code_stats::{DataTypeKind, SizeKind, FieldInfo, VariantInfo};
12
12
use self :: code_stats:: CodeStats ;
13
13
14
14
use hir:: def_id:: CrateNum ;
15
- use ich :: Fingerprint ;
15
+ use rustc_data_structures :: fingerprint :: Fingerprint ;
16
16
17
- use ich;
18
17
use lint;
19
18
use lint:: builtin:: BuiltinLintDiagnostics ;
20
19
use middle:: allocator:: AllocatorKind ;
21
20
use middle:: dependency_format;
22
21
use session:: search_paths:: PathKind ;
23
22
use session:: config:: { OutputType , Lto } ;
24
- use ty:: tls;
25
23
use util:: nodemap:: { FxHashMap , FxHashSet } ;
26
24
use util:: common:: { duration_to_secs_str, ErrorReported } ;
27
25
use util:: common:: ProfileQueriesMsg ;
@@ -34,7 +32,6 @@ use errors::emitter::{Emitter, EmitterWriter};
34
32
use syntax:: edition:: Edition ;
35
33
use syntax:: json:: JsonEmitter ;
36
34
use syntax:: feature_gate;
37
- use syntax:: symbol:: Symbol ;
38
35
use syntax:: parse;
39
36
use syntax:: parse:: ParseSess ;
40
37
use syntax:: { ast, codemap} ;
@@ -51,7 +48,6 @@ use std;
51
48
use std:: cell:: { self , Cell , RefCell } ;
52
49
use std:: collections:: HashMap ;
53
50
use std:: env;
54
- use std:: fmt;
55
51
use std:: io:: Write ;
56
52
use std:: path:: { Path , PathBuf } ;
57
53
use std:: time:: Duration ;
@@ -128,9 +124,6 @@ pub struct Session {
128
124
129
125
incr_comp_session : OneThread < RefCell < IncrCompSession > > ,
130
126
131
- /// A cache of attributes ignored by StableHashingContext
132
- pub ignored_attr_names : FxHashSet < Symbol > ,
133
-
134
127
/// Used by -Z profile-queries in util::common
135
128
pub profile_channel : Lock < Option < mpsc:: Sender < ProfileQueriesMsg > > > ,
136
129
@@ -1143,7 +1136,6 @@ pub fn build_session_(
1143
1136
injected_panic_runtime : Once :: new ( ) ,
1144
1137
imported_macro_spans : OneThread :: new ( RefCell :: new ( HashMap :: new ( ) ) ) ,
1145
1138
incr_comp_session : OneThread :: new ( RefCell :: new ( IncrCompSession :: NotInitialized ) ) ,
1146
- ignored_attr_names : ich:: compute_ignored_attr_names ( ) ,
1147
1139
self_profiling : Lock :: new ( SelfProfiler :: new ( ) ) ,
1148
1140
profile_channel : Lock :: new ( None ) ,
1149
1141
perf_stats : PerfStats {
@@ -1235,7 +1227,7 @@ impl From<Fingerprint> for CrateDisambiguator {
1235
1227
}
1236
1228
}
1237
1229
1238
- impl_stable_hash_for ! ( tuple_struct CrateDisambiguator { fingerprint } ) ;
1230
+ impl_stable_hash_via_hash ! ( CrateDisambiguator ) ;
1239
1231
1240
1232
/// Holds data on the current incremental compilation session, if there is one.
1241
1233
#[ derive( Debug ) ]
@@ -1307,39 +1299,3 @@ pub fn compile_result_from_err_count(err_count: usize) -> CompileResult {
1307
1299
Err ( CompileIncomplete :: Errored ( ErrorReported ) )
1308
1300
}
1309
1301
}
1310
-
1311
- #[ cold]
1312
- #[ inline( never) ]
1313
- pub fn bug_fmt ( file : & ' static str , line : u32 , args : fmt:: Arguments ) -> ! {
1314
- // this wrapper mostly exists so I don't have to write a fully
1315
- // qualified path of None::<Span> inside the bug!() macro definition
1316
- opt_span_bug_fmt ( file, line, None :: < Span > , args) ;
1317
- }
1318
-
1319
- #[ cold]
1320
- #[ inline( never) ]
1321
- pub fn span_bug_fmt < S : Into < MultiSpan > > (
1322
- file : & ' static str ,
1323
- line : u32 ,
1324
- span : S ,
1325
- args : fmt:: Arguments ,
1326
- ) -> ! {
1327
- opt_span_bug_fmt ( file, line, Some ( span) , args) ;
1328
- }
1329
-
1330
- fn opt_span_bug_fmt < S : Into < MultiSpan > > (
1331
- file : & ' static str ,
1332
- line : u32 ,
1333
- span : Option < S > ,
1334
- args : fmt:: Arguments ,
1335
- ) -> ! {
1336
- tls:: with_opt ( move |tcx| {
1337
- let msg = format ! ( "{}:{}: {}" , file, line, args) ;
1338
- match ( tcx, span) {
1339
- ( Some ( tcx) , Some ( span) ) => tcx. sess . diagnostic ( ) . span_bug ( span, & msg) ,
1340
- ( Some ( tcx) , None ) => tcx. sess . diagnostic ( ) . bug ( & msg) ,
1341
- ( None , _) => panic ! ( msg) ,
1342
- }
1343
- } ) ;
1344
- unreachable ! ( ) ;
1345
- }
0 commit comments