]> git.lizzy.rs Git - rust.git/blob - example/std_example.rs
Merge pull request #332 from bjorn3/dependabot/cargo/rand_jitter-0.1.3
[rust.git] / example / std_example.rs
1 #![feature(core_intrinsics)]
2
3 use std::io::Write;
4
5 fn main() {
6     let _ = ::std::iter::repeat('a' as u8).take(10).collect::<Vec<_>>();
7     let stderr = ::std::io::stderr();
8     let mut stderr = stderr.lock();
9
10     writeln!(stderr, "some {} text", "<unknown>").unwrap();
11
12     let _ = std::process::Command::new("true").env("c", "d").spawn();
13
14     println!("cargo:rustc-link-lib=z");
15
16     static ONCE: std::sync::Once = std::sync::ONCE_INIT;
17     ONCE.call_once(|| {});
18
19     LoopState::Continue(()) == LoopState::Break(());
20 }
21
22 #[derive(PartialEq)]
23 enum LoopState {
24     Continue(()),
25     Break(())
26 }