File tree 2 files changed +6
-2
lines changed
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -200,7 +200,7 @@ impl Diagnostic {
200
200
children : db. children . iter ( ) . map ( |c| {
201
201
Diagnostic :: from_sub_diagnostic ( c, je)
202
202
} ) . chain ( sugg) . collect ( ) ,
203
- rendered : Some ( output. to_owned ( ) ) ,
203
+ rendered : Some ( output) ,
204
204
}
205
205
}
206
206
Original file line number Diff line number Diff line change @@ -2411,7 +2411,11 @@ actual:\n\
2411
2411
let mut normalized = output. replace ( & parent_dir_str, "$DIR" ) ;
2412
2412
2413
2413
if json {
2414
- normalized = normalized. replace ( "\\ n" , "\n " ) ; // verbatim newline in json strings
2414
+ // escaped newlines in json strings should be readable
2415
+ // in the stderr files. There's no point int being correct,
2416
+ // since only humans process the stderr files.
2417
+ // Thus we just turn escaped newlines back into newlines.
2418
+ normalized = normalized. replace ( "\\ n" , "\n " ) ;
2415
2419
}
2416
2420
2417
2421
normalized = normalized. replace ( "\\ \\ " , "\\ " ) // denormalize for paths on windows
You can’t perform that action at this time.
0 commit comments