bounded-integer-plugin 0.1.1

Bounded integers compiler plugin
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// This example should be kept in sync with the documentation example in bounded-integer.

#![feature(plugin)]
#![plugin(bounded_integer_plugin)]

#[macro_use]
extern crate bounded_integer;

bounded_integer! {
    /// Value that can fit in a nibble.
    #[derive(Debug)]
    pub enum Nibble: i8 { -8...7 }
}

fn main() { }