Skip to content

Commit fa8d396

Browse files
committed
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.
1 parent 55b9adf commit fa8d396

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/test/ui/rfcs/rfc-1014-2.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ fn close_stdout() {
2323
#[cfg(windows)]
2424
fn main() {
2525
close_stdout();
26-
println!("hello world");
26+
println!("hello");
27+
println!("world");
2728
}
2829

2930
#[cfg(not(windows))]

src/test/ui/rfcs/rfc-1014.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,6 @@ fn close_stdout() {
3030

3131
fn main() {
3232
close_stdout();
33-
println!("hello world");
33+
println!("hello");
34+
println!("world");
3435
}

0 commit comments

Comments
 (0)