2012-11-28 14:34:30 -06:00
|
|
|
// Using the real Num from core
|
|
|
|
|
|
|
|
use cmp::Ord;
|
|
|
|
use num::from_int;
|
|
|
|
|
2012-12-07 17:09:59 -06:00
|
|
|
pub trait NumExt: Num Ord { }
|
2012-11-28 14:34:30 -06:00
|
|
|
|
|
|
|
fn greater_than_one<T:NumExt>(n: &T) -> bool {
|
|
|
|
*n > from_int(1)
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|