@@ -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).
@@ -366,37 +358,6 @@ impl Session {
366
358
self . diagnostic ( ) . span_note_without_error ( sp, msg)
367
359
}
368
360
369
- pub fn buffer_lint_late < S : Into < MultiSpan > > (
370
- & self ,
371
- lint : & ' static lint:: Lint ,
372
- id : ast:: NodeId ,
373
- sp : S ,
374
- msg : & str ,
375
- ) {
376
- match * self . buffered_lints . borrow_mut ( ) {
377
- Some ( ref mut buffer) => {
378
- buffer. buffer_lint ( lint, id, sp, msg) ;
379
- }
380
- None => bug ! ( "can't buffer lints after HIR lowering" ) ,
381
- }
382
- }
383
-
384
- pub fn buffer_lint_with_diagnostic_late < S : Into < MultiSpan > > (
385
- & self ,
386
- lint : & ' static lint:: Lint ,
387
- id : ast:: NodeId ,
388
- sp : S ,
389
- msg : & str ,
390
- diagnostic : BuiltinLintDiagnostics ,
391
- ) {
392
- match * self . buffered_lints . borrow_mut ( ) {
393
- Some ( ref mut buffer) => buffer. buffer_lint_with_diagnostic (
394
- lint, id, sp. into ( ) , msg, diagnostic,
395
- ) ,
396
- None => bug ! ( "can't buffer lints after HIR lowering" ) ,
397
- }
398
- }
399
-
400
361
pub fn reserve_node_ids ( & self , count : usize ) -> ast:: NodeId {
401
362
let id = self . next_node_id . get ( ) ;
402
363
@@ -1220,7 +1181,6 @@ fn build_session_(
1220
1181
sysroot,
1221
1182
local_crate_source_file,
1222
1183
working_dir,
1223
- buffered_lints : Lock :: new ( Some ( Default :: default ( ) ) ) ,
1224
1184
one_time_diagnostics : Default :: default ( ) ,
1225
1185
plugin_llvm_passes : OneThread :: new ( RefCell :: new ( Vec :: new ( ) ) ) ,
1226
1186
plugin_attributes : Lock :: new ( Vec :: new ( ) ) ,
0 commit comments