about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-08-13 17:42:06 -0700
committerBrian Anderson <banderson@mozilla.com>2012-08-13 18:59:17 -0700
commit6b43c0c1add8d2caaa3c391d8d8daca2c609047e (patch)
tree2223eb0347d5dd4084afaed19120874fd2a03c7b /src/libcore
parent2e1b98d34f105f4632b30bcd5c51e40cb7a1b637 (diff)
Stop parsing old operator overloading syntax
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/at_vec.rs7
-rw-r--r--src/libcore/core.rs4
-rw-r--r--src/libcore/dvec.rs6
-rw-r--r--src/libcore/send_map.rs3
-rw-r--r--src/libcore/str.rs6
-rw-r--r--src/libcore/vec.rs18
6 files changed, 2 insertions, 42 deletions
diff --git a/src/libcore/at_vec.rs b/src/libcore/at_vec.rs
index 74f3c59acae..87802c5c13b 100644
--- a/src/libcore/at_vec.rs
+++ b/src/libcore/at_vec.rs
@@ -123,13 +123,6 @@ pure fn from_elem<T: copy>(n_elts: uint, t: T) -> @[T] {
     }
 }
 
-impl<T: copy> @[T]: vec_concat<T> {
-    #[inline(always)]
-    pure fn +(rhs: &[const T]) -> @[T] {
-        append(self, rhs)
-    }
-}
-
 #[cfg(notest)]
 impl<T: copy> @[T]: add<&[const T],@[T]> {
     #[inline(always)]
diff --git a/src/libcore/core.rs b/src/libcore/core.rs
index dfd53eae20a..14bafcd68f4 100644
--- a/src/libcore/core.rs
+++ b/src/libcore/core.rs
@@ -8,7 +8,7 @@ import path = path::path;
 import tuple::{tuple_ops, extended_tuple_ops};
 import str::{str_slice, unique_str};
 import vec::{const_vector, copyable_vector, immutable_vector};
-import vec::{immutable_copyable_vector, iter_trait_extensions, vec_concat};
+import vec::{immutable_copyable_vector, iter_trait_extensions};
 import iter::{base_iter, extended_iter, copyable_iter, times, timesi};
 import num::num;
 import ptr::ptr;
@@ -21,7 +21,7 @@ export num, times, timesi;
 // The following exports are the common traits
 export str_slice, unique_str;
 export const_vector, copyable_vector, immutable_vector;
-export immutable_copyable_vector, iter_trait_extensions, vec_concat;
+export immutable_copyable_vector, iter_trait_extensions;
 export base_iter, copyable_iter, extended_iter;
 export tuple_ops, extended_tuple_ops;
 export ptr;
diff --git a/src/libcore/dvec.rs b/src/libcore/dvec.rs
index e4ff406a9b7..1f349b67002 100644
--- a/src/libcore/dvec.rs
+++ b/src/libcore/dvec.rs
@@ -258,12 +258,6 @@ impl<A: copy> dvec<A> {
 
     /// Copy out an individual element
     #[inline(always)]
-    pure fn [](idx: uint) -> A {
-        self.get_elt(idx)
-    }
-
-    /// Copy out an individual element
-    #[inline(always)]
     pure fn get_elt(idx: uint) -> A {
         self.check_not_borrowed();
         return self.data[idx];
diff --git a/src/libcore/send_map.rs b/src/libcore/send_map.rs
index f49cee1ba07..6ce590c5ec9 100644
--- a/src/libcore/send_map.rs
+++ b/src/libcore/send_map.rs
@@ -275,9 +275,6 @@ mod linear {
             option::unwrap(value)
         }
 
-        fn [](k: &K) -> V {
-            self.get(k)
-        }
     }
 
     impl<K,V> &linear_map<K,V> {
diff --git a/src/libcore/str.rs b/src/libcore/str.rs
index 62fb03e9263..8584d4f1524 100644
--- a/src/libcore/str.rs
+++ b/src/libcore/str.rs
@@ -1911,12 +1911,6 @@ impl ~str: unique_str {
     /// Returns a string with trailing whitespace removed
     #[inline]
     fn trim_right() -> ~str { trim_right(self) }
-
-    /// Concatenate two strings: operator version
-    #[inline(always)]
-    pure fn +(rhs: &str) -> ~str {
-        append(self, rhs)
-    }
 }
 
 #[cfg(notest)]
diff --git a/src/libcore/vec.rs b/src/libcore/vec.rs
index a90f2fca55f..fcda831d905 100644
--- a/src/libcore/vec.rs
+++ b/src/libcore/vec.rs
@@ -1289,17 +1289,6 @@ pure fn as_mut_buf<T,U>(s: &[mut T],
     }
 }
 
-trait vec_concat<T> {
-    pure fn +(rhs: &[const T]) -> self;
-}
-
-impl<T: copy> ~[T]: vec_concat<T> {
-    #[inline(always)]
-    pure fn +(rhs: &[const T]) -> ~[T] {
-        append(self, rhs)
-    }
-}
-
 #[cfg(notest)]
 impl<T: copy> ~[T]: add<&[const T],~[T]> {
     #[inline(always)]
@@ -1308,13 +1297,6 @@ impl<T: copy> ~[T]: add<&[const T],~[T]> {
     }
 }
 
-impl<T: copy> ~[mut T]: vec_concat<T> {
-    #[inline(always)]
-    pure fn +(rhs: &[const T]) -> ~[mut T] {
-        append_mut(self, rhs)
-    }
-}
-
 impl<T: copy> ~[mut T]: add<&[const T],~[mut T]> {
     #[inline(always)]
     pure fn add(rhs: &[const T]) -> ~[mut T] {