@@ -20,8 +20,7 @@ use rustc_errors::annotate_snippet_emitter_writer::AnnotateSnippetEmitterWriter;
20
20
use rustc_errors:: emitter:: { Emitter , EmitterWriter , HumanReadableErrorType } ;
21
21
use rustc_errors:: json:: JsonEmitter ;
22
22
use rustc_errors:: registry:: Registry ;
23
- use rustc_errors:: { Diagnostic , DiagnosticBuilder , DiagnosticId , ErrorReported } ;
24
- use rustc_lint_defs:: FutureBreakage ;
23
+ use rustc_errors:: { DiagnosticBuilder , DiagnosticId , ErrorReported } ;
25
24
use rustc_macros:: HashStable_Generic ;
26
25
pub use rustc_span:: def_id:: StableCrateId ;
27
26
use rustc_span:: source_map:: { FileLoader , MultiSpan , RealFileLoader , SourceMap , Span } ;
@@ -317,23 +316,7 @@ impl Session {
317
316
if diags. is_empty ( ) {
318
317
return ;
319
318
}
320
- // If any future-breakage lints were registered, this lint store
321
- // should be available
322
- let lint_store = self . lint_store . get ( ) . expect ( "`lint_store` not initialized!" ) ;
323
- let diags_and_breakage: Vec < ( FutureBreakage , Diagnostic ) > = diags
324
- . into_iter ( )
325
- . map ( |diag| {
326
- let lint_name = match & diag. code {
327
- Some ( DiagnosticId :: Lint { name, has_future_breakage : true , .. } ) => name,
328
- _ => panic ! ( "Unexpected code in diagnostic {:?}" , diag) ,
329
- } ;
330
- let lint = lint_store. name_to_lint ( & lint_name) ;
331
- let future_breakage =
332
- lint. lint . future_incompatible . unwrap ( ) . future_breakage . unwrap ( ) ;
333
- ( future_breakage, diag)
334
- } )
335
- . collect ( ) ;
336
- self . parse_sess . span_diagnostic . emit_future_breakage_report ( diags_and_breakage) ;
319
+ self . parse_sess . span_diagnostic . emit_future_breakage_report ( diags) ;
337
320
}
338
321
339
322
pub fn local_stable_crate_id ( & self ) -> StableCrateId {
0 commit comments