Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
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.
  • Loading branch information
tmiasko committed Aug 15, 2020
commit fa8d396d58366f62049c0df622dd09897966ed13
3 changes: 2 additions & 1 deletion src/test/ui/rfcs/rfc-1014-2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ fn close_stdout() {
#[cfg(windows)]
fn main() {
close_stdout();
println!("hello world");
println!("hello");
println!("world");
}

#[cfg(not(windows))]
Expand Down
3 changes: 2 additions & 1 deletion src/test/ui/rfcs/rfc-1014.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,6 @@ fn close_stdout() {

fn main() {
close_stdout();
println!("hello world");
println!("hello");
println!("world");
}