about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorBrian Anderson <andersrb@gmail.com>2012-06-08 22:59:53 -0700
committerBrian Anderson <andersrb@gmail.com>2012-06-08 22:59:53 -0700
commitc91d5aa95c98066c96ede105fa80d84ca9062192 (patch)
tree1a5cb20edd754badd3b1d0923bd41ff3ddc19647 /src
parent7ec171f6ae795050e571dad2c5122ded584e2505 (diff)
parentd14d4155dead7a18b2d5b8dcac1dd7311a26900a (diff)
downloadrust-c91d5aa95c98066c96ede105fa80d84ca9062192.tar.gz
rust-c91d5aa95c98066c96ede105fa80d84ca9062192.zip
Merge pull request #2560 from bstrie/num
Allow multiple `num` impls to be imported at once
Diffstat (limited to 'src')
-rw-r--r--src/libcore/int-template.rs5
-rw-r--r--src/libcore/uint-template.rs3
2 files changed, 3 insertions, 5 deletions
diff --git a/src/libcore/int-template.rs b/src/libcore/int-template.rs
index 2ea166cfc36..cfe61697608 100644
--- a/src/libcore/int-template.rs
+++ b/src/libcore/int-template.rs
@@ -1,6 +1,5 @@
 import T = inst::T;
 import cmp::{eq, ord};
-import num::num;
 
 export min_value, max_value;
 export min, max;
@@ -124,7 +123,7 @@ impl eq of eq for T {
     }
 }
 
-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; }
@@ -196,7 +195,7 @@ fn test_to_str() {
 
 #[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);
diff --git a/src/libcore/uint-template.rs b/src/libcore/uint-template.rs
index 8a79270361d..cb9b759eeae 100644
--- a/src/libcore/uint-template.rs
+++ b/src/libcore/uint-template.rs
@@ -1,6 +1,5 @@
 import T = inst::T;
 import cmp::{eq, ord};
-import num::num;
 
 export min_value, max_value;
 export min, max;
@@ -65,7 +64,7 @@ impl eq of eq for T {
     }
 }
 
-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; }