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> {
666
666
writeln ! ( f, "_{}" , sym) ?;
667
667
}
668
668
} ;
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 } ) ;
671
671
}
672
672
} else if is_windows {
673
673
let res: io:: Result < ( ) > = try {
@@ -681,8 +681,8 @@ impl<'a> Linker for GccLinker<'a> {
681
681
writeln ! ( f, " {}" , symbol) ?;
682
682
}
683
683
} ;
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 } ) ;
686
686
}
687
687
} else {
688
688
// Write an LD version script
@@ -972,8 +972,8 @@ impl<'a> Linker for MsvcLinker<'a> {
972
972
writeln ! ( f, " {}" , symbol) ?;
973
973
}
974
974
} ;
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 } ) ;
977
977
}
978
978
let mut arg = OsString :: from ( "/DEF:" ) ;
979
979
arg. push ( path) ;
Original file line number Diff line number Diff line change 1
1
//! Errors emitted by codegen_ssa
2
2
3
3
use rustc_macros:: SessionDiagnostic ;
4
+ use std:: io:: Error ;
4
5
5
6
#[ derive( SessionDiagnostic ) ]
6
7
#[ diag( codegen_ssa:: missing_native_static_library) ]
@@ -11,5 +12,5 @@ pub struct MissingNativeStaticLibrary<'a> {
11
12
#[ derive( SessionDiagnostic ) ]
12
13
#[ diag( codegen_ssa:: lib_def_write_failure) ]
13
14
pub struct LibDefWriteFailure {
14
- pub error_description : String ,
15
+ pub error : Error ,
15
16
}
Original file line number Diff line number Diff line change 1
1
codegen_ssa_missing_native_static_library = could not find native static library `{ $library_name } `, perhaps an -L flag is missing?
2
2
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