11//! Errors emitted by codegen_ssa
22
33use rustc_errors:: { DiagnosticArgValue , IntoDiagnosticArg } ;
4- use rustc_macros:: SessionDiagnostic ;
4+ use rustc_macros:: Diagnostic ;
55use std:: borrow:: Cow ;
66use std:: io:: Error ;
77use std:: path:: { Path , PathBuf } ;
88
9- #[ derive( SessionDiagnostic ) ]
9+ #[ derive( Diagnostic ) ]
1010#[ diag( codegen_ssa:: missing_native_static_library) ]
1111pub struct MissingNativeStaticLibrary < ' a > {
1212 pub library_name : & ' a str ,
1313}
1414
15- #[ derive( SessionDiagnostic ) ]
15+ #[ derive( Diagnostic ) ]
1616#[ diag( codegen_ssa:: lib_def_write_failure) ]
1717pub struct LibDefWriteFailure {
1818 pub error : Error ,
1919}
2020
21- #[ derive( SessionDiagnostic ) ]
21+ #[ derive( Diagnostic ) ]
2222#[ diag( codegen_ssa:: version_script_write_failure) ]
2323pub struct VersionScriptWriteFailure {
2424 pub error : Error ,
2525}
2626
27- #[ derive( SessionDiagnostic ) ]
27+ #[ derive( Diagnostic ) ]
2828#[ diag( codegen_ssa:: symbol_file_write_failure) ]
2929pub struct SymbolFileWriteFailure {
3030 pub error : Error ,
3131}
3232
33- #[ derive( SessionDiagnostic ) ]
33+ #[ derive( Diagnostic ) ]
3434#[ diag( codegen_ssa:: unsupported_arch) ]
3535pub struct UnsupportedArch ;
3636
37- #[ derive( SessionDiagnostic ) ]
37+ #[ derive( Diagnostic ) ]
3838#[ diag( codegen_ssa:: msvc_path_not_found) ]
3939pub struct MsvcPathNotFound ;
4040
41- #[ derive( SessionDiagnostic ) ]
41+ #[ derive( Diagnostic ) ]
4242#[ diag( codegen_ssa:: link_exe_not_found) ]
4343pub struct LinkExeNotFound ;
4444
45- #[ derive( SessionDiagnostic ) ]
45+ #[ derive( Diagnostic ) ]
4646#[ diag( codegen_ssa:: ld64_unimplemented_modifier) ]
4747pub struct Ld64UnimplementedModifier ;
4848
49- #[ derive( SessionDiagnostic ) ]
49+ #[ derive( Diagnostic ) ]
5050#[ diag( codegen_ssa:: linker_unsupported_modifier) ]
5151pub struct LinkerUnsupportedModifier ;
5252
53- #[ derive( SessionDiagnostic ) ]
53+ #[ derive( Diagnostic ) ]
5454#[ diag( codegen_ssa:: L4Bender_exporting_symbols_unimplemented ) ]
5555pub struct L4BenderExportingSymbolsUnimplemented ;
5656
57- #[ derive( SessionDiagnostic ) ]
57+ #[ derive( Diagnostic ) ]
5858#[ diag( codegen_ssa:: no_natvis_directory) ]
5959pub struct NoNatvisDirectory {
6060 pub error : Error ,
6161}
6262
63- #[ derive( SessionDiagnostic ) ]
63+ #[ derive( Diagnostic ) ]
6464#[ diag( codegen_ssa:: copy_path_buf) ]
6565pub struct CopyPathBuf {
6666 pub source_file : PathBuf ,
@@ -69,7 +69,7 @@ pub struct CopyPathBuf {
6969}
7070
7171// Reports Paths using `Debug` implementation rather than Path's `Display` implementation.
72- #[ derive( SessionDiagnostic ) ]
72+ #[ derive( Diagnostic ) ]
7373#[ diag( codegen_ssa:: copy_path) ]
7474pub struct CopyPath < ' a > {
7575 from : DebugArgPath < ' a > ,
@@ -93,13 +93,13 @@ impl IntoDiagnosticArg for DebugArgPath<'_> {
9393 }
9494}
9595
96- #[ derive( SessionDiagnostic ) ]
96+ #[ derive( Diagnostic ) ]
9797#[ diag( codegen_ssa:: ignoring_emit_path) ]
9898pub struct IgnoringEmitPath {
9999 pub extension : String ,
100100}
101101
102- #[ derive( SessionDiagnostic ) ]
102+ #[ derive( Diagnostic ) ]
103103#[ diag( codegen_ssa:: ignoring_output) ]
104104pub struct IgnoringOutput {
105105 pub extension : String ,
0 commit comments