File tree Expand file tree Collapse file tree 3 files changed +9
-8
lines changed
rustc_error_messages/locales/en-US Expand file tree Collapse file tree 3 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -666,8 +666,8 @@ impl<'a> Linker for GccLinker<'a> {
666666 writeln ! ( f, "_{}" , sym) ?;
667667 }
668668 } ;
669- if let Err ( e ) = res {
670- self . sess . emit_fatal ( LibDefWriteFailure { error_description : format ! ( "{e}" ) } ) ;
669+ if let Err ( error ) = res {
670+ self . sess . emit_fatal ( LibDefWriteFailure { error } ) ;
671671 }
672672 } else if is_windows {
673673 let res: io:: Result < ( ) > = try {
@@ -681,8 +681,8 @@ impl<'a> Linker for GccLinker<'a> {
681681 writeln ! ( f, " {}" , symbol) ?;
682682 }
683683 } ;
684- if let Err ( e ) = res {
685- self . sess . emit_fatal ( LibDefWriteFailure { error_description : format ! ( "{e}" ) } ) ;
684+ if let Err ( error ) = res {
685+ self . sess . emit_fatal ( LibDefWriteFailure { error } ) ;
686686 }
687687 } else {
688688 // Write an LD version script
@@ -972,8 +972,8 @@ impl<'a> Linker for MsvcLinker<'a> {
972972 writeln ! ( f, " {}" , symbol) ?;
973973 }
974974 } ;
975- if let Err ( e ) = res {
976- self . sess . emit_fatal ( LibDefWriteFailure { error_description : format ! ( "{e}" ) } ) ;
975+ if let Err ( error ) = res {
976+ self . sess . emit_fatal ( LibDefWriteFailure { error } ) ;
977977 }
978978 let mut arg = OsString :: from ( "/DEF:" ) ;
979979 arg. push ( path) ;
Original file line number Diff line number Diff line change 11//! Errors emitted by codegen_ssa
22
33use rustc_macros:: SessionDiagnostic ;
4+ use std:: io:: Error ;
45
56#[ derive( SessionDiagnostic ) ]
67#[ diag( codegen_ssa:: missing_native_static_library) ]
@@ -11,5 +12,5 @@ pub struct MissingNativeStaticLibrary<'a> {
1112#[ derive( SessionDiagnostic ) ]
1213#[ diag( codegen_ssa:: lib_def_write_failure) ]
1314pub struct LibDefWriteFailure {
14- pub error_description : String ,
15+ pub error : Error ,
1516}
Original file line number Diff line number Diff line change 11codegen_ssa_missing_native_static_library = could not find native static library `{ $library_name } `, perhaps an -L flag is missing?
22
3- codegen_ssa_lib_def_write_failure = failed to write lib.def file: { $error_description }
3+ codegen_ssa_lib_def_write_failure = failed to write lib.def file: { $error }
You can’t perform that action at this time.
0 commit comments