]> git.lizzy.rs Git - rust.git/blob - example/std_example.rs
[WIP]
[rust.git] / example / std_example.rs
1 #![feature(core_intrinsics)]
2
3 use std::io::Write;
4
5 fn main() {
6     assert_eq!((1u128 + 2) as u16, 3);
7 }
8
9 #[derive(PartialEq)]
10 enum LoopState {
11     Continue(()),
12     Break(())
13 }
14
15 pub enum Instruction {
16     Increment,
17     Loop,
18 }
19
20 fn map(a: Option<(u8, Box<Instruction>)>) -> Option<Box<Instruction>> {
21     match a {
22         None => None,
23         Some((_, instr)) => Some(instr),
24     }
25 }