about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/librustc/middle/check_const.rs17
-rw-r--r--src/libstd/json.rs6
-rw-r--r--src/libstd/workcache.rs8
-rw-r--r--src/libsyntax/parse/mod.rs3
-rw-r--r--src/libsyntax/parse/parser.rs14
5 files changed, 21 insertions, 27 deletions
diff --git a/src/librustc/middle/check_const.rs b/src/librustc/middle/check_const.rs
index 6d4de6aeb93..c86f7ea5a92 100644
--- a/src/librustc/middle/check_const.rs
+++ b/src/librustc/middle/check_const.rs
@@ -16,7 +16,6 @@ use middle::ty;
 use middle::typeck;
 use util::ppaux;
 
-use core::dvec::DVec;
 use core::option;
 use std::oldmap::HashMap;
 use syntax::ast::*;
@@ -212,20 +211,20 @@ pub fn check_item_recursion(sess: Session,
                             ast_map: ast_map::map,
                             def_map: resolve::DefMap,
                             it: @item) {
-    type env = {
+    struct env {
         root_it: @item,
         sess: Session,
         ast_map: ast_map::map,
         def_map: resolve::DefMap,
-        idstack: @DVec<node_id>,
-    };
+        idstack: @mut ~[node_id]
+    }
 
-    let env = {
+    let env = env {
         root_it: it,
         sess: sess,
         ast_map: ast_map,
         def_map: def_map,
-        idstack: @DVec()
+        idstack: @mut ~[]
     };
 
     let visitor = visit::mk_vt(@visit::Visitor {
@@ -236,12 +235,12 @@ pub fn check_item_recursion(sess: Session,
     (visitor.visit_item)(it, env, visitor);
 
     fn visit_item(it: @item, &&env: env, v: visit::vt<env>) {
-        if (*env.idstack).contains(&(it.id)) {
+        if env.idstack.contains(&(it.id)) {
             env.sess.span_fatal(env.root_it.span, ~"recursive constant");
         }
-        (*env.idstack).push(it.id);
+        env.idstack.push(it.id);
         visit::visit_item(it, env, v);
-        (*env.idstack).pop();
+        env.idstack.pop();
     }
 
     fn visit_expr(e: @expr, &&env: env, v: visit::vt<env>) {
diff --git a/src/libstd/json.rs b/src/libstd/json.rs
index 088afe4778e..8434e2c4782 100644
--- a/src/libstd/json.rs
+++ b/src/libstd/json.rs
@@ -1298,7 +1298,7 @@ mod tests {
     // and json... not sure where to put these tests.
     #[test]
     fn test_write_enum () {
-        let bw = @io::BytesWriter {bytes: dvec::DVec(), pos: 0};
+        let bw = @io::BytesWriter();
         let bww : @io::Writer = (bw as @io::Writer);
         let encoder = (@Encoder(bww) as @serialize::Encoder);
         do encoder.emit_enum(~"animal") {
@@ -1319,7 +1319,7 @@ mod tests {
 
     #[test]
     fn test_write_some () {
-        let bw = @io::BytesWriter {bytes: dvec::DVec(), pos: 0};
+        let bw = @io::BytesWriter();
         let bww : @io::Writer = (bw as @io::Writer);
         let encoder = (@Encoder(bww) as @serialize::Encoder);
         do encoder.emit_enum(~"Option") {
@@ -1335,7 +1335,7 @@ mod tests {
 
     #[test]
     fn test_write_none () {
-        let bw = @io::BytesWriter {bytes: dvec::DVec(), pos: 0};
+        let bw = @io::BytesWriter();
         let bww : @io::Writer = (bw as @io::Writer);
         let encoder = (@Encoder(bww) as @serialize::Encoder);
         do encoder.emit_enum(~"Option") {
diff --git a/src/libstd/workcache.rs b/src/libstd/workcache.rs
index d652b18cfad..87a72f988c3 100644
--- a/src/libstd/workcache.rs
+++ b/src/libstd/workcache.rs
@@ -16,7 +16,6 @@ use serialize::{Encoder, Encodable, Decoder, Decodable};
 use sort;
 
 use core::cmp;
-use core::dvec;
 use core::either::{Either, Left, Right};
 use core::io;
 use core::option;
@@ -141,13 +140,12 @@ type WorkMap = LinearMap<WorkKey, ~str>;
 
 pub impl<S: Encoder> WorkMap: Encodable<S> {
     fn encode(&self, s: &S) {
-        let d = dvec::DVec();
+        let mut d = ~[];
         for self.each |&(k, v)| {
             d.push((copy *k, copy *v))
         }
-        let mut v = d.get();
-        sort::tim_sort(v);
-        v.encode(s)
+        sort::tim_sort(d);
+        d.encode(s)
     }
 }
 
diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs
index 12038898a9d..84d6ebd83c7 100644
--- a/src/libsyntax/parse/mod.rs
+++ b/src/libsyntax/parse/mod.rs
@@ -227,12 +227,11 @@ mod test {
     use super::*;
     use std::serialize::Encodable;
     use std;
-    use core::dvec;
     use core::str;
     use util::testing::*;
 
     #[test] fn to_json_str (val: Encodable<std::json::Encoder>) -> ~str {
-        let bw = @io::BytesWriter {bytes: dvec::DVec(), pos: 0};
+        let bw = @io::BytesWriter();
         val.encode(~std::json::Encoder(bw as io::Writer));
         str::from_bytes(bw.bytes.data)
     }
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 41ccf39e2ce..c9ca28768db 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -84,8 +84,6 @@ use print::pprust::expr_to_str;
 use util::interner::Interner;
 
 use core::cmp;
-use core::dvec::DVec;
-use core::dvec;
 use core::either::{Either, Left, Right};
 use core::either;
 use core::result::Result;
@@ -1323,11 +1321,11 @@ pub impl Parser {
     }
 
     fn parse_all_token_trees() -> ~[token_tree] {
-        let tts = DVec();
+        let mut tts = ~[];
         while self.token != token::EOF {
             tts.push(self.parse_token_tree());
         }
-        tts.get()
+        tts
     }
 
     fn parse_matchers() -> ~[matcher] {
@@ -3954,7 +3952,7 @@ pub impl Parser {
             VIEW_ITEMS_AND_ITEMS_ALLOWED | IMPORTS_AND_ITEMS_ALLOWED => false
         };
 
-        let (view_items, items, foreign_items) = (DVec(), DVec(), DVec());
+        let mut (view_items, items, foreign_items) = (~[], ~[], ~[]);
         loop {
             match self.parse_item_or_view_item(attrs, items_allowed,
                                                foreign_items_allowed,
@@ -3986,9 +3984,9 @@ pub impl Parser {
         }
 
         {attrs_remaining: attrs,
-         view_items: dvec::unwrap(move view_items),
-         items: dvec::unwrap(move items),
-         foreign_items: dvec::unwrap(move foreign_items)}
+         view_items: view_items,
+         items: items,
+         foreign_items: foreign_items}
     }
 
     // Parses a source module as a crate