about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev@gmail.com>2020-08-21 17:55:10 +0900
committerGitHub <noreply@github.com>2020-08-21 17:55:10 +0900
commit87c22f487134079cfe0294e0287f5536d8d8a67c (patch)
treeea08d1a600ce39c1ba6ecb057083c203cda48212 /src
parentf2d25538d4fad07dd2ded520de968dbb85e84aa9 (diff)
parentfa8d396d58366f62049c0df622dd09897966ed13 (diff)
downloadrust-87c22f487134079cfe0294e0287f5536d8d8a67c.tar.gz
rust-87c22f487134079cfe0294e0287f5536d8d8a67c.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/rfcs/rfc-1014-2.rs3
-rw-r--r--src/test/ui/rfcs/rfc-1014.rs3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/test/ui/rfcs/rfc-1014-2.rs b/src/test/ui/rfcs/rfc-1014-2.rs
index 5be092204d7..7dd65701f12 100644
--- a/src/test/ui/rfcs/rfc-1014-2.rs
+++ b/src/test/ui/rfcs/rfc-1014-2.rs
@@ -23,7 +23,8 @@ fn close_stdout() {
 #[cfg(windows)]
 fn main() {
     close_stdout();
-    println!("hello world");
+    println!("hello");
+    println!("world");
 }
 
 #[cfg(not(windows))]
diff --git a/src/test/ui/rfcs/rfc-1014.rs b/src/test/ui/rfcs/rfc-1014.rs
index 41a036958bf..53b8fddcf31 100644
--- a/src/test/ui/rfcs/rfc-1014.rs
+++ b/src/test/ui/rfcs/rfc-1014.rs
@@ -30,5 +30,6 @@ fn close_stdout() {
 
 fn main() {
     close_stdout();
-    println!("hello world");
+    println!("hello");
+    println!("world");
 }