File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -200,7 +200,7 @@ impl Diagnostic {
200200 children : db. children . iter ( ) . map ( |c| {
201201 Diagnostic :: from_sub_diagnostic ( c, je)
202202 } ) . chain ( sugg) . collect ( ) ,
203- rendered : Some ( output. to_owned ( ) ) ,
203+ rendered : Some ( output) ,
204204 }
205205 }
206206
Original file line number Diff line number Diff line change @@ -2411,7 +2411,11 @@ actual:\n\
24112411 let mut normalized = output. replace ( & parent_dir_str, "$DIR" ) ;
24122412
24132413 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 " ) ;
24152419 }
24162420
24172421 normalized = normalized. replace ( "\\ \\ " , "\\ " ) // denormalize for paths on windows
You can’t perform that action at this time.
0 commit comments