Rollup merge of #75532 - tmiasko:rfc-1014, r=nikomatsakis

Fix RFC-1014 test

Use two printlns when testing that writing to a closed stdout does not
panic. Otherwise the test is ineffective, since the current implementation
silently ignores the error during first println regardless.
This commit is contained in:
Yuki Okushi 2020-08-21 17:55:10 +09:00 committed by GitHub
commit 87c22f4871
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -23,7 +23,8 @@ fn close_stdout() {
#[cfg(windows)]
fn main() {
close_stdout();
println!("hello world");
println!("hello");
println!("world");
}
#[cfg(not(windows))]

View File

@ -30,5 +30,6 @@ fn close_stdout() {
fn main() {
close_stdout();
println!("hello world");
println!("hello");
println!("world");
}