@@ -6,7 +6,6 @@ use crate::hir::def_id::CrateNum;
6
6
use rustc_data_structures:: fingerprint:: Fingerprint ;
7
7
8
8
use crate :: lint;
9
- use crate :: lint:: builtin:: BuiltinLintDiagnostics ;
10
9
use crate :: session:: config:: { OutputType , PrintRequest , Sanitizer , SwitchWithOptPath } ;
11
10
use crate :: session:: search_paths:: { PathKind , SearchPath } ;
12
11
use crate :: util:: nodemap:: { FxHashMap , FxHashSet } ;
@@ -77,13 +76,6 @@ pub struct Session {
77
76
/// if the value stored here has been affected by path remapping.
78
77
pub working_dir : ( PathBuf , bool ) ,
79
78
80
- /// This is intended to be used from a single thread.
81
- ///
82
- /// FIXME: there was a previous comment about this not being thread safe,
83
- /// but it's not clear how or why that's the case. The LintBuffer itself is certainly thread
84
- /// safe at least from a "Rust safety" standpoint.
85
- pub buffered_lints : Lock < Option < lint:: LintBuffer > > ,
86
-
87
79
/// Set of `(DiagnosticId, Option<Span>, message)` tuples tracking
88
80
/// (sub)diagnostics that have been set once, but should not be set again,
89
81
/// in order to avoid redundantly verbose output (Issue #24690, #44953).
@@ -363,37 +355,6 @@ impl Session {
363
355
self . diagnostic ( ) . span_note_without_error ( sp, msg)
364
356
}
365
357
366
- pub fn buffer_lint_late < S : Into < MultiSpan > > (
367
- & self ,
368
- lint : & ' static lint:: Lint ,
369
- id : ast:: NodeId ,
370
- sp : S ,
371
- msg : & str ,
372
- ) {
373
- match * self . buffered_lints . borrow_mut ( ) {
374
- Some ( ref mut buffer) => {
375
- buffer. buffer_lint ( lint, id, sp, msg) ;
376
- }
377
- None => bug ! ( "can't buffer lints after HIR lowering" ) ,
378
- }
379
- }
380
-
381
- pub fn buffer_lint_with_diagnostic_late < S : Into < MultiSpan > > (
382
- & self ,
383
- lint : & ' static lint:: Lint ,
384
- id : ast:: NodeId ,
385
- sp : S ,
386
- msg : & str ,
387
- diagnostic : BuiltinLintDiagnostics ,
388
- ) {
389
- match * self . buffered_lints . borrow_mut ( ) {
390
- Some ( ref mut buffer) => buffer. buffer_lint_with_diagnostic (
391
- lint, id, sp. into ( ) , msg, diagnostic,
392
- ) ,
393
- None => bug ! ( "can't buffer lints after HIR lowering" ) ,
394
- }
395
- }
396
-
397
358
pub fn reserve_node_ids ( & self , count : usize ) -> ast:: NodeId {
398
359
let id = self . next_node_id . get ( ) ;
399
360
@@ -1217,7 +1178,6 @@ fn build_session_(
1217
1178
sysroot,
1218
1179
local_crate_source_file,
1219
1180
working_dir,
1220
- buffered_lints : Lock :: new ( Some ( Default :: default ( ) ) ) ,
1221
1181
one_time_diagnostics : Default :: default ( ) ,
1222
1182
plugin_llvm_passes : OneThread :: new ( RefCell :: new ( Vec :: new ( ) ) ) ,
1223
1183
plugin_attributes : Lock :: new ( Vec :: new ( ) ) ,
0 commit comments