about summary refs log tree commit diff
path: root/src/libextra
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-02-01 11:16:24 -0800
committerbors <bors@rust-lang.org>2014-02-01 11:16:24 -0800
commit2bcd951749b67402ccaa31f1bb0349656f880fe2 (patch)
treebb3de89383f032ca622a27e20e237282c9569a48 /src/libextra
parent60ffbeb2a495d097e38f51348ebcf5a884947c25 (diff)
parent212507413a2768ec4b6a072dde73d60527c2beee (diff)
downloadrust-2bcd951749b67402ccaa31f1bb0349656f880fe2.tar.gz
rust-2bcd951749b67402ccaa31f1bb0349656f880fe2.zip
auto merge of #11974 : huonw/rust/no-at-vec, r=pcwalton
This removes @[] from the parser as well as much of the handling of it (and `@str`) from the compiler as I can find.

I've just rebased @pcwalton's (already reviewed) `@str` removal (and fixed the problems in a separate commit); the only new work is the trailing commits with my authorship.

Closes #11967 
Diffstat (limited to 'src/libextra')
-rw-r--r--src/libextra/num/bigint.rs2
-rw-r--r--src/libextra/serialize.rs33
2 files changed, 1 insertions, 34 deletions
diff --git a/src/libextra/num/bigint.rs b/src/libextra/num/bigint.rs
index c1959843d59..cea899b18c0 100644
--- a/src/libextra/num/bigint.rs
+++ b/src/libextra/num/bigint.rs
@@ -80,7 +80,7 @@ pub mod BigDigit {
 /**
 A big unsigned integer type.
 
-A `BigUint`-typed value `BigUint { data: @[a, b, c] }` represents a number
+A `BigUint`-typed value `BigUint { data: ~[a, b, c] }` represents a number
 `(a + b * BigDigit::base + c * BigDigit::base^2)`.
 */
 #[deriving(Clone)]
diff --git a/src/libextra/serialize.rs b/src/libextra/serialize.rs
index 020404057fb..9b1b1e0548e 100644
--- a/src/libextra/serialize.rs
+++ b/src/libextra/serialize.rs
@@ -18,7 +18,6 @@ Core encoding and decoding interfaces.
 #[forbid(non_camel_case_types)];
 
 
-use std::at_vec;
 use std::hashmap::{HashMap, HashSet};
 use std::rc::Rc;
 use std::trie::{TrieMap, TrieSet};
@@ -310,18 +309,6 @@ impl<D:Decoder> Decodable<D> for ~str {
     }
 }
 
-impl<S:Encoder> Encodable<S> for @str {
-    fn encode(&self, s: &mut S) {
-        s.emit_str(*self)
-    }
-}
-
-impl<D:Decoder> Decodable<D> for @str {
-    fn decode(d: &mut D) -> @str {
-        d.read_str().to_managed()
-    }
-}
-
 impl<S:Encoder> Encodable<S> for f32 {
     fn encode(&self, s: &mut S) {
         s.emit_f32(*self)
@@ -456,26 +443,6 @@ impl<D:Decoder,T:Decodable<D>> Decodable<D> for ~[T] {
     }
 }
 
-impl<S:Encoder,T:Encodable<S>> Encodable<S> for @[T] {
-    fn encode(&self, s: &mut S) {
-        s.emit_seq(self.len(), |s| {
-            for (i, e) in self.iter().enumerate() {
-                s.emit_seq_elt(i, |s| e.encode(s))
-            }
-        })
-    }
-}
-
-impl<D:Decoder,T:Decodable<D>> Decodable<D> for @[T] {
-    fn decode(d: &mut D) -> @[T] {
-        d.read_seq(|d, len| {
-            at_vec::from_fn(len, |i| {
-                d.read_seq_elt(i, |d| Decodable::decode(d))
-            })
-        })
-    }
-}
-
 impl<S:Encoder,T:Encodable<S>> Encodable<S> for Option<T> {
     fn encode(&self, s: &mut S) {
         s.emit_option(|s| {