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:
commit
87c22f4871
2 changed files with 4 additions and 2 deletions
|
@ -23,7 +23,8 @@ fn close_stdout() {
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
fn main() {
|
fn main() {
|
||||||
close_stdout();
|
close_stdout();
|
||||||
println!("hello world");
|
println!("hello");
|
||||||
|
println!("world");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(windows))]
|
#[cfg(not(windows))]
|
||||||
|
|
|
@ -30,5 +30,6 @@ fn close_stdout() {
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
close_stdout();
|
close_stdout();
|
||||||
println!("hello world");
|
println!("hello");
|
||||||
|
println!("world");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue