RosettaCodeData/Task/Hello-world-Standard-error/Rust/hello-world-standard-error-1.rust

9 lines
288 B
Text
Raw Normal View History

2016-12-05 22:15:40 +01:00
fn main() {
2017-09-23 10:01:46 +02:00
use ::std::io::Write;
let (stderr, errmsg) = (&mut ::std::io::stderr(), "Error writing to stderr");
writeln!(stderr, "Bye, world!").expect(errmsg);
let (goodbye, world) = ("Goodbye", "world");
writeln!(stderr, "{}, {}!", goodbye, world).expect(errmsg);
2016-12-05 22:15:40 +01:00
}