UPDATE - LibDefWriteFailure to accept type instead of formatted string
This follows team’s suggestions in this thread https://rust-lang.zulipchat.com/#narrow/stream/336883-i18n/topic/.23100717.20diag.20translation/near/295305249
This commit is contained in:
@@ -666,8 +666,8 @@ impl<'a> Linker for GccLinker<'a> {
|
||||
writeln!(f, "_{}", sym)?;
|
||||
}
|
||||
};
|
||||
if let Err(e) = res {
|
||||
self.sess.emit_fatal(LibDefWriteFailure { error_description: format!("{e}") });
|
||||
if let Err(error) = res {
|
||||
self.sess.emit_fatal(LibDefWriteFailure { error });
|
||||
}
|
||||
} else if is_windows {
|
||||
let res: io::Result<()> = try {
|
||||
@@ -681,8 +681,8 @@ impl<'a> Linker for GccLinker<'a> {
|
||||
writeln!(f, " {}", symbol)?;
|
||||
}
|
||||
};
|
||||
if let Err(e) = res {
|
||||
self.sess.emit_fatal(LibDefWriteFailure { error_description: format!("{e}") });
|
||||
if let Err(error) = res {
|
||||
self.sess.emit_fatal(LibDefWriteFailure { error });
|
||||
}
|
||||
} else {
|
||||
// Write an LD version script
|
||||
@@ -972,8 +972,8 @@ impl<'a> Linker for MsvcLinker<'a> {
|
||||
writeln!(f, " {}", symbol)?;
|
||||
}
|
||||
};
|
||||
if let Err(e) = res {
|
||||
self.sess.emit_fatal(LibDefWriteFailure { error_description: format!("{e}") });
|
||||
if let Err(error) = res {
|
||||
self.sess.emit_fatal(LibDefWriteFailure { error });
|
||||
}
|
||||
let mut arg = OsString::from("/DEF:");
|
||||
arg.push(path);
|
||||
|
||||
Reference in New Issue
Block a user