Rust RangeType
An Ada-inspired Range type for Rust.
Features
Compile-time checks
The following will fail to compile:
extern crate rangetype;
Run-time checks
// Will panic since the two numbers are for different ranges
let x = range!;
let y = range!;
x + y // panic!
// Will panic because 5 + 10 = 15 which will overflow the range of 0..10
let x = range!;
let y = range!;
let z = x + y; // panic!