Skip to content

Commit a44bb87

Browse files
author
Jonathan Turner
authored
Rollup merge of #37066 - nrc:stderr, r=alexcrichton
Error monitor should emit error to stderr instead of stdout We are pretty consistent about emitting to stderr, except for when there is actually an error, in which case we emit to stdout. This seems a bit backwards. This PR just changes that exception to emit to stderr. This is useful for the RLS since the LS protocol uses stdout (grrr). r? @alexcrichton
2 parents 57f664f + 4df0f3f commit a44bb87

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc_driver/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1110,7 +1110,7 @@ pub fn monitor<F: FnOnce() + Send + 'static>(f: F) {
11101110
errors::Level::Note);
11111111
}
11121112

1113-
println!("{}", str::from_utf8(&data.lock().unwrap()).unwrap());
1113+
writeln!(io::stderr(), "{}", str::from_utf8(&data.lock().unwrap()).unwrap()).unwrap();
11141114
}
11151115

11161116
exit_on_err();

0 commit comments

Comments
 (0)