rust/example/std_example.rs
2019-02-16 15:42:20 +01:00

16 lines
385 B
Rust

#![feature(core_intrinsics)]
use std::io::Write;
fn main() {
let _ = ::std::iter::repeat('a' as u8).take(10).collect::<Vec<_>>();
let stderr = ::std::io::stderr();
let mut stderr = stderr.lock();
writeln!(stderr, "some {} text", "<unknown>").unwrap();
let _ = std::process::Command::new("true").env("c", "d").spawn();
println!("cargo:rustc-link-lib=z");
}