Skip to content

Commit 2c87920

Browse files
committed
test: Removing dvec uses
1 parent 7f99a02 commit 2c87920

File tree

9 files changed

+9
-142
lines changed

9 files changed

+9
-142
lines changed

src/librustc/middle/astencode.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ use middle::{ty, typeck, moves};
2525
use middle;
2626
use util::ppaux::ty_to_str;
2727

28-
use core::{io, option, vec};
2928
use std::ebml::reader;
3029
use std::ebml;
3130
use std::serialize;
@@ -1210,6 +1209,7 @@ fn mk_ctxt() -> fake_ext_ctxt {
12101209
12111210
#[cfg(test)]
12121211
fn roundtrip(in_item: Option<@ast::item>) {
1212+
use core::io;
12131213
use std::prettyprint;
12141214
12151215
let in_item = in_item.get();

src/test/auxiliary/cci_nested_lib.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,9 @@
1010

1111
#[legacy_modes];
1212

13-
use core::dvec::DVec;
14-
1513
pub struct Entry<A,B> {key: A, value: B}
1614

17-
pub struct alist<A,B> { eq_fn: @fn(A,A) -> bool, data: DVec<Entry<A,B>> }
15+
pub struct alist<A,B> { eq_fn: @fn(A,A) -> bool, data: @mut ~[Entry<A,B>] }
1816

1917
pub fn alist_add<A:Copy,B:Copy>(lst: alist<A,B>, k: A, v: B) {
2018
lst.data.push(Entry{key:k, value:v});
@@ -31,12 +29,12 @@ pub fn alist_get<A:Copy,B:Copy>(lst: alist<A,B>, k: A) -> B {
3129
#[inline]
3230
pub fn new_int_alist<B:Copy>() -> alist<int, B> {
3331
fn eq_int(&&a: int, &&b: int) -> bool { a == b }
34-
return alist {eq_fn: eq_int, data: DVec()};
32+
return alist {eq_fn: eq_int, data: @mut ~[]};
3533
}
3634

3735
#[inline]
3836
pub fn new_int_alist_2<B:Copy>() -> alist<int, B> {
3937
#[inline]
4038
fn eq_int(&&a: int, &&b: int) -> bool { a == b }
41-
return alist {eq_fn: eq_int, data: DVec()};
39+
return alist {eq_fn: eq_int, data: @mut ~[]};
4240
}

src/test/auxiliary/issue-2631-a.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@
1313

1414
extern mod std;
1515

16-
use core::dvec::*;
1716
use std::oldmap::HashMap;
1817

19-
pub type header_map = HashMap<~str, @DVec<@~str>>;
18+
pub type header_map = HashMap<~str, @mut ~[@~str]>;
2019

2120
// the unused ty param is necessary so this gets monomorphized
2221
pub fn request<T:Copy>(req: header_map) {

src/test/bench/core-vec-append.rs

Lines changed: 0 additions & 76 deletions
This file was deleted.

src/test/compile-fail/issue-2590.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use core::dvec::DVec;
12-
1311
struct parser {
14-
tokens: DVec<int>,
12+
tokens: ~[int],
1513
}
1614

1715
trait parse {
@@ -20,7 +18,7 @@ trait parse {
2018

2119
impl parse for parser {
2220
fn parse() -> ~[int] {
23-
::core::dvec::unwrap(self.tokens) //~ ERROR moving out of immutable field
21+
self.tokens //~ ERROR moving out of immutable field
2422
}
2523
}
2624

src/test/run-pass/call-closure-from-overloaded-op.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
fn foo() -> int { 22 }
1212

1313
pub fn main() {
14-
let x = dvec::DVec::<@fn() -> int>();
14+
let x: ~[@fn() -> int] = ~[];
1515
x.push(foo);
1616
fail_unless!((x[0])() == 22);
1717
}

src/test/run-pass/dvec-index-op.rs

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/test/run-pass/dvec-test.rs

Lines changed: 0 additions & 36 deletions
This file was deleted.

src/test/run-pass/issue-2631-b.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ use std::oldmap::HashMap;
2121
pub fn main() {
2222
let v = ~[@~"hi"];
2323
let m: req::header_map = HashMap();
24-
m.insert(~"METHOD", @dvec::from_vec(v));
24+
m.insert(~"METHOD", @mut ~[v]);
2525
request::<int>(m);
2626
}

0 commit comments

Comments
 (0)