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

9 lines
288 B
Text
Raw Permalink Normal View History

2016-12-05 22:15:40 +01:00
fn main() {
2019-09-12 10:33:56 -07: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
}