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

9 lines
288 B
Plaintext

fn main() {
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);
}