about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-07-28 16:05:38 -0700
committerBrian Anderson <banderson@mozilla.com>2012-07-28 16:06:25 -0700
commite178999833b9b484c3a5defcccfee2ed7f57e7d9 (patch)
treec9afa431edfa2705394cb7d39e382acac7990b4a
parent2df03bfdca16c23aaa7c3e10a876924edcd18469 (diff)
downloadrust-e178999833b9b484c3a5defcccfee2ed7f57e7d9.tar.gz
rust-e178999833b9b484c3a5defcccfee2ed7f57e7d9.zip
core: More magic to make core build with --test
-rw-r--r--src/libcore/core.rs11
-rw-r--r--src/libcore/dvec.rs2
-rw-r--r--src/libcore/str.rs3
-rw-r--r--src/libcore/vec.rs5
4 files changed, 17 insertions, 4 deletions
diff --git a/src/libcore/core.rs b/src/libcore/core.rs
index f015db98328..448f800f566 100644
--- a/src/libcore/core.rs
+++ b/src/libcore/core.rs
@@ -60,6 +60,17 @@ export add, sub, mul, div, modulo, neg, bitand, bitor, bitxor;
 #[cfg(notest)]
 export shl, shr, index;
 
+#[cfg(test)]
+use coreops(name = "core", vers = "0.3");
+
+#[cfg(test)]
+import coreops::ops::{const, copy, send, owned};
+#[cfg(test)]
+import coreops::ops::{add, sub, mul, div, modulo, neg, bitand, bitor, bitxor};
+#[cfg(test)]
+import coreops::ops::{shl, shr, index};
+
+
 // Export the log levels as global constants. Higher levels mean
 // more-verbosity. Error is the bottom level, default logging level is
 // warn-and-below.
diff --git a/src/libcore/dvec.rs b/src/libcore/dvec.rs
index 1a1aeeadeb6..838eeee7dc4 100644
--- a/src/libcore/dvec.rs
+++ b/src/libcore/dvec.rs
@@ -311,7 +311,7 @@ impl extensions<A:copy> for dvec<A> {
     }
 }
 
-impl extensions<A:copy> of ops::index<uint,A> for dvec<A> {
+impl extensions<A:copy> of index<uint,A> for dvec<A> {
     pure fn index(&&idx: uint) -> A {
         self.get_elt(idx)
     }
diff --git a/src/libcore/str.rs b/src/libcore/str.rs
index c56af8442f6..85de50c5a0f 100644
--- a/src/libcore/str.rs
+++ b/src/libcore/str.rs
@@ -1918,7 +1918,8 @@ impl extensions of unique_str for ~str {
     }
 }
 
-impl extensions of ops::add<&str,~str> for ~str {
+#[cfg(notest)]
+impl extensions of add<&str,~str> for ~str {
     #[inline(always)]
     pure fn add(rhs: &str) -> ~str {
         append(self, rhs)
diff --git a/src/libcore/vec.rs b/src/libcore/vec.rs
index a97c8f8601a..9698e229d20 100644
--- a/src/libcore/vec.rs
+++ b/src/libcore/vec.rs
@@ -1299,7 +1299,8 @@ impl extensions<T: copy> of vec_concat<T> for ~[T] {
     }
 }
 
-impl extensions<T: copy> of ops::add<&[const T],~[T]> for ~[T] {
+#[cfg(notest)]
+impl extensions<T: copy> of add<&[const T],~[T]> for ~[T] {
     #[inline(always)]
     pure fn add(rhs: &[const T]) -> ~[T] {
         append(self, rhs)
@@ -1313,7 +1314,7 @@ impl extensions<T: copy> of vec_concat<T> for ~[mut T] {
     }
 }
 
-impl extensions<T: copy> of ops::add<&[const T],~[mut T]> for ~[mut T] {
+impl extensions<T: copy> of add<&[const T],~[mut T]> for ~[mut T] {
     #[inline(always)]
     pure fn add(rhs: &[const T]) -> ~[mut T] {
         append_mut(self, rhs)