Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Address PR comments
  • Loading branch information
oli-obk committed Nov 20, 2017
1 parent ddaf523 commit 3864d89
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/libsyntax/json.rs
Expand Up @@ -200,7 +200,7 @@ impl Diagnostic {
children: db.children.iter().map(|c| {
Diagnostic::from_sub_diagnostic(c, je)
}).chain(sugg).collect(),
rendered: Some(output.to_owned()),
rendered: Some(output),
}
}

Expand Down
6 changes: 5 additions & 1 deletion src/tools/compiletest/src/runtest.rs
Expand Up @@ -2411,7 +2411,11 @@ actual:\n\
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
Expand Down

0 comments on commit 3864d89

Please sign in to comment.