@@ -18,18 +18,18 @@ use rustc_attr_parsing::eval_config_entry;
1818use rustc_data_structures:: fx:: { FxHashSet , FxIndexSet } ;
1919use rustc_data_structures:: memmap:: Mmap ;
2020use rustc_data_structures:: temp_dir:: MaybeTempDir ;
21- use rustc_errors:: { DiagCtxtHandle , LintDiagnostic } ;
21+ use rustc_errors:: DiagCtxtHandle ;
2222use rustc_fs_util:: { TempDirBuilder , fix_windows_verbatim_for_gcc, try_canonicalize} ;
2323use rustc_hir:: attrs:: NativeLibKind ;
2424use rustc_hir:: def_id:: { CrateNum , LOCAL_CRATE } ;
25- use rustc_macros:: LintDiagnostic ;
25+ use rustc_macros:: Diagnostic ;
2626use rustc_metadata:: fs:: { METADATA_FILENAME , copy_to_stdout, emit_wrapper_file} ;
2727use rustc_metadata:: {
2828 EncodedMetadata , NativeLibSearchFallback , find_native_static_library,
2929 walk_native_lib_search_dirs,
3030} ;
3131use rustc_middle:: bug;
32- use rustc_middle:: lint:: lint_level ;
32+ use rustc_middle:: lint:: diag_lint_level ;
3333use rustc_middle:: middle:: debugger_visualizer:: DebuggerVisualizerFile ;
3434use rustc_middle:: middle:: dependency_format:: Linkage ;
3535use rustc_middle:: middle:: exported_symbols:: SymbolExportKind ;
@@ -662,7 +662,7 @@ fn link_dwarf_object(sess: &Session, cg_results: &CodegenResults, executable_out
662662 }
663663}
664664
665- #[ derive( LintDiagnostic ) ]
665+ #[ derive( Diagnostic ) ]
666666#[ diag( "{$inner}" ) ]
667667/// Translating this is kind of useless. We don't pass translation flags to the linker, so we'd just
668668/// end up with inconsistent languages within the same diagnostic.
@@ -938,9 +938,7 @@ fn link_natively(
938938
939939 let level = codegen_results. crate_info . lint_levels . linker_messages ;
940940 let lint = |msg| {
941- lint_level ( sess, LINKER_MESSAGES , level, None , |diag| {
942- LinkerOutput { inner : msg } . decorate_lint ( diag)
943- } )
941+ diag_lint_level ( sess, LINKER_MESSAGES , level, None , LinkerOutput { inner : msg } ) ;
944942 } ;
945943
946944 if !prog. stderr . is_empty ( ) {
0 commit comments