If we import num::num, it gets reexported implicitly and causes collisions if
you try to import (for example) int::num and i8::num at the same time.
import T = inst::T;
import cmp::{eq, ord};
-import num::num;
export min_value, max_value;
export min, max;
}
}
-impl num of num for T {
+impl num of num::num for T {
fn add(&&other: T) -> T { ret self + other; }
fn sub(&&other: T) -> T { ret self - other; }
fn mul(&&other: T) -> T { ret self * other; }
#[test]
fn test_ifaces() {
- fn test<U:num>(ten: U) {
+ fn test<U:num::num>(ten: U) {
assert (ten.to_int() == 10);
let two = ten.from_int(2);
import T = inst::T;
import cmp::{eq, ord};
-import num::num;
export min_value, max_value;
export min, max;
}
}
-impl num of num for T {
+impl num of num::num for T {
fn add(&&other: T) -> T { ret self + other; }
fn sub(&&other: T) -> T { ret self - other; }
fn mul(&&other: T) -> T { ret self * other; }