]> git.proxmox.com Git - rustc.git/blobdiff - src/test/run-fail/mir_dynamic_drops_2.rs
New upstream version 1.23.0+dfsg1
[rustc.git] / src / test / run-fail / mir_dynamic_drops_2.rs
index 7a90298e4225323ab81633d0796bb61b68db9fc1..d2fe50401ab8de4a6da8dc44169f13dac44fe103 100644 (file)
@@ -9,7 +9,6 @@
 // except according to those terms.
 
 // error-pattern:drop 1
-use std::io::{self, Write};
 
 
 /// Structure which will not allow to be dropped twice.
@@ -17,10 +16,10 @@ struct Droppable<'a>(&'a mut bool, u32);
 impl<'a> Drop for Droppable<'a> {
     fn drop(&mut self) {
         if *self.0 {
-            writeln!(io::stderr(), "{} dropped twice", self.1);
+            eprintln!("{} dropped twice", self.1);
             ::std::process::exit(1);
         }
-        writeln!(io::stderr(), "drop {}", self.1);
+        eprintln!("drop {}", self.1);
         *self.0 = true;
     }
 }