mirror of
https://github.com/rust-lang/rust.git
synced 2026-06-01 22:18:23 +03:00
Address PR comments
This commit is contained in:
@@ -200,7 +200,7 @@ fn flush(&mut self) -> io::Result<()> {
|
||||
children: db.children.iter().map(|c| {
|
||||
Diagnostic::from_sub_diagnostic(c, je)
|
||||
}).chain(sugg).collect(),
|
||||
rendered: Some(output.to_owned()),
|
||||
rendered: Some(output),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2411,7 +2411,11 @@ fn normalize_output(&self, output: &str, custom_rules: &[(String, String)]) -> S
|
||||
let mut normalized = output.replace(&parent_dir_str, "$DIR");
|
||||
|
||||
if json {
|
||||
normalized = normalized.replace("\\n", "\n"); // verbatim newline in json strings
|
||||
// escaped newlines in json strings should be readable
|
||||
// in the stderr files. There's no point int being correct,
|
||||
// since only humans process the stderr files.
|
||||
// Thus we just turn escaped newlines back into newlines.
|
||||
normalized = normalized.replace("\\n", "\n");
|
||||
}
|
||||
|
||||
normalized = normalized.replace("\\\\", "\\") // denormalize for paths on windows
|
||||
|
||||
Reference in New Issue
Block a user