Skip to content

Commit 6d778ff

Browse files
committed
Remove outdated and unnecessary std::vec_ng::Vec imports.
(And fix some tests.)
1 parent af79a5a commit 6d778ff

File tree

168 files changed

+26
-273
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

168 files changed

+26
-273
lines changed

src/compiletest/compiletest.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ extern crate getopts;
2121
extern crate log;
2222

2323
use std::os;
24-
use std::vec_ng::Vec;
2524
use std::io;
2625
use std::io::fs;
2726
use getopts::{optopt, optflag, reqopt};

src/compiletest/errors.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
// except according to those terms.
1010

1111
use std::io::{BufferedReader, File};
12-
use std::vec_ng::Vec;
1312

1413
pub struct ExpectedError { line: uint, kind: ~str, msg: ~str }
1514

src/compiletest/header.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ use common::config;
1212
use common;
1313
use util;
1414

15-
use std::vec_ng::Vec;
16-
1715
pub struct TestProps {
1816
// Lines that should be expected, in order, on standard out
1917
error_patterns: Vec<~str> ,

src/compiletest/runtest.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ use std::os;
3333
use std::str;
3434
use std::task;
3535
use std::slice;
36-
use std::vec_ng;
37-
36+
use std::vec;
3837
use test::MetricMap;
3938

4039
pub fn run(config: config, testfile: ~str) {

src/libarena/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,6 @@ impl<T> Drop for TypedArena<T> {
489489
mod tests {
490490
extern crate test;
491491

492-
use std::vec_ng::Vec;
493492

494493
use self::test::BenchHarness;
495494
use super::{Arena, TypedArena};

src/libgetopts/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,6 @@ mod tests {
903903

904904
use std::result::{Err, Ok};
905905
use std::result;
906-
use std::vec_ng::Vec;
907906

908907
fn check_fail_type(f: Fail_, ft: FailType) {
909908
match f {

src/libsync/arc.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,6 @@ mod tests {
583583
use super::{Arc, RWArc, MutexArc, CowArc};
584584

585585
use std::task;
586-
use std::vec_ng::Vec;
587586

588587
#[test]
589588
fn manually_share_arc() {

src/libsync/sync/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,6 @@ mod tests {
765765
use std::result;
766766
use std::task;
767767
use std::comm::Empty;
768-
use std::vec_ng::Vec;
769768

770769
/************************************************************************
771770
* Semaphore tests

src/libterm/terminfo/parm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ fn format(val: Param, op: FormatOp, flags: Flags) -> Result<Vec<u8> ,~str> {
563563
mod test {
564564
use super::{expand,String,Variables,Number};
565565
use std::result::Ok;
566-
use std::vec_ng;
566+
use std::vec;
567567

568568
#[test]
569569
fn test_basic_setabf() {

src/libuuid/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,6 @@ mod test {
538538
Version5Sha1};
539539
use std::str;
540540
use std::io::MemWriter;
541-
use std::vec_ng::Vec;
542541

543542
#[test]
544543
fn test_nil() {

src/test/auxiliary/anon-extern-mod-cross-crate-1.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
use std::libc;
1414

15-
use std::vec_ng::Vec;
1615
#[link(name="rustrt")]
1716
extern {
1817
pub fn rust_get_test_int() -> libc::intptr_t;

src/test/auxiliary/cci_class_6.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
// except according to those terms.
1010

1111
pub mod kitties {
12-
use std::vec_ng::Vec;
1312

1413
pub struct cat<U> {
1514
priv info : Vec<U> ,

src/test/auxiliary/cci_nested_lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#[feature(managed_boxes)];
1212

1313
use std::cell::RefCell;
14-
use std::vec_ng::Vec;
1514

1615
pub struct Entry<A,B> {
1716
key: A,

src/test/auxiliary/cci_no_inline_lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
#[crate_id="cci_no_inline_lib"];
1212

13-
use std::vec_ng::Vec;
1413

1514
// same as cci_iter_lib, more-or-less, but not marked inline
1615
pub fn iter(v: Vec<uint> , f: |uint|) {

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
extern crate collections;
1616

1717
use std::cell::RefCell;
18-
use std::vec_ng::Vec;
1918
use collections::HashMap;
2019

2120
pub type header_map = HashMap<~str, @RefCell<Vec<@~str>>>;

src/test/auxiliary/issue_2723_a.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use std::vec_ng::Vec;
1211

1312
pub unsafe fn f(xs: Vec<int> ) {
1413
xs.map(|_x| { unsafe fn q() { fail!(); } });

src/test/bench/core-uint-to-str.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
use std::os;
1212
use std::uint;
13-
use std::vec_ng::Vec;
1413

1514
fn main() {
1615
let args = os::args();

src/test/bench/msgsend-pipes-shared.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ use std::comm;
2424
use std::os;
2525
use std::task;
2626
use std::uint;
27-
use std::vec_ng::Vec;
2827

2928
fn move_out<T>(_x: T) {}
3029

src/test/bench/msgsend-pipes.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ extern crate time;
1919
use std::os;
2020
use std::task;
2121
use std::uint;
22-
use std::vec_ng::Vec;
2322

2423
fn move_out<T>(_x: T) {}
2524

src/test/bench/msgsend-ring-mutex-arcs.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ use sync::MutexArc;
2323
use sync::Future;
2424
use std::os;
2525
use std::uint;
26-
use std::vec_ng::Vec;
2726

2827
// A poor man's pipe.
2928
type pipe = MutexArc<Vec<uint> >;

src/test/bench/msgsend-ring-rw-arcs.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ use sync::RWArc;
2222
use sync::Future;
2323
use std::os;
2424
use std::uint;
25-
use std::vec_ng::Vec;
2625

2726
// A poor man's pipe.
2827
type pipe = RWArc<Vec<uint> >;

src/test/bench/shootout-ackermann.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
// except according to those terms.
1010

1111
use std::os;
12-
use std::vec_ng::Vec;
1312

1413
fn ack(m: int, n: int) -> int {
1514
if m == 0 {

src/test/bench/shootout-chameneos-redux.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
use std::option;
1414
use std::os;
1515
use std::task;
16-
use std::vec_ng::Vec;
1716

1817
fn print_complements() {
1918
let all = [Blue, Red, Yellow];

src/test/bench/shootout-fasta.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ use std::io;
1818
use std::io::{BufferedWriter, File};
1919
use std::cmp::min;
2020
use std::os;
21-
use std::vec_ng::Vec;
2221

2322
static LINE_LENGTH: uint = 60;
2423
static IM: u32 = 139968;

src/test/bench/shootout-fibo.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
// except according to those terms.
1010

1111
use std::os;
12-
use std::vec_ng::Vec;
1312

1413
fn fib(n: int) -> int {
1514
if n < 2 {

src/test/bench/shootout-k-nucleotide-pipes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use std::os;
2424
use std::io;
2525
use std::str;
2626
use std::task;
27-
use std::slice;
27+
use std::vec;
2828

2929
fn f64_cmp(x: f64, y: f64) -> Ordering {
3030
// arbitrarily decide that NaNs are larger than everything.

src/test/bench/shootout-meteor.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
// Utilities.
1313
//
1414

15-
use std::vec_ng::Vec;
1615

1716
// returns an infinite iterator of repeated applications of f to x,
1817
// i.e. [x, f(x), f(f(x)), ...], as haskell iterate function.

src/test/bench/shootout-nbody.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
// except according to those terms.
1010

1111
use std::os;
12-
use std::vec_ng::Vec;
1312

1413
static PI: f64 = 3.141592653589793;
1514
static SOLAR_MASS: f64 = 4.0 * PI * PI;

src/test/bench/shootout-pfib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ use std::os;
2525
use std::result::{Ok, Err};
2626
use std::task;
2727
use std::uint;
28-
use std::vec_ng::Vec;
2928

3029
fn fib(n: int) -> int {
3130
fn pfib(tx: &Sender<int>, n: int) {

src/test/bench/shootout-spectralnorm.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ use std::from_str::FromStr;
1414
use std::iter::count;
1515
use std::cmp::min;
1616
use std::os;
17-
use std::slice::from_elem;
1817
use sync::RWArc;
1918

2019
fn A(i: uint, j: uint) -> f64 {
@@ -49,7 +48,7 @@ fn mult(v: RWArc<Vec<f64>>,
4948
spawn(proc() {
5049
for i in range(chk, min(len, chk + chunk)) {
5150
let val = v.read(|v| f(v, i));
52-
out.write(|out| out[i] = val);
51+
out.write(|out| *out.get_mut(i) = val);
5352
}
5453
drop(tx)
5554
});
@@ -98,15 +97,16 @@ fn main() {
9897
} else {
9998
FromStr::from_str(args[1]).unwrap()
10099
};
101-
let u = RWArc::new(from_elem(n, 1.));
102-
let v = RWArc::new(from_elem(n, 1.));
103-
let tmp = RWArc::new(from_elem(n, 1.));
100+
let u = RWArc::new(Vec::from_elem(n, 1.));
101+
let v = RWArc::new(Vec::from_elem(n, 1.));
102+
let tmp = RWArc::new(Vec::from_elem(n, 1.));
104103
for _ in range(0, 10) {
105104
mult_AtAv(u.clone(), v.clone(), tmp.clone());
106105
mult_AtAv(v.clone(), u.clone(), tmp.clone());
107106
}
108107

109108
u.read(|u| v.read(|v| {
110-
println!("{:.9f}", (dot(*u, *v) / dot(*v, *v)).sqrt());
109+
println!("{:.9f}",
110+
(dot(u.as_slice(), v.as_slice()) / dot(v.as_slice(), v.as_slice())).sqrt());
111111
}))
112112
}

src/test/bench/std-smallintmap.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ extern crate time;
1616
use collections::SmallIntMap;
1717
use std::os;
1818
use std::uint;
19-
use std::vec_ng::Vec;
2019

2120
fn append_sequential(min: uint, max: uint, map: &mut SmallIntMap<uint>) {
2221
for i in range(min, max) {

src/test/bench/sudoku.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ impl Sudoku {
7070
7171
let mut g = Vec::from_fn(10u, { |_i| vec!(0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8) });
7272
for line in reader.lines() {
73+
let line = line.unwrap();
7374
let comps: Vec<&str> = line.trim().split(',').collect();
7475
7576
if comps.len() == 3u {

src/test/bench/task-perf-alloc-unwind.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ use collections::list::{List, Cons, Nil};
1717
use time::precise_time_s;
1818
use std::os;
1919
use std::task;
20-
use std::vec_ng::Vec;
21-
use std::vec_ng;
20+
use std::vec;
2221

2322
enum UniqueList {
2423
ULNil, ULCons(~UniqueList)

src/test/bench/task-perf-jargon-metal-smoke.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ use std::comm;
2121
use std::os;
2222
use std::task;
2323
use std::uint;
24-
use std::vec_ng::Vec;
2524

2625
fn child_generation(gens_left: uint, tx: comm::Sender<()>) {
2726
// This used to be O(n^2) in the number of generations that ever existed.

src/test/bench/task-perf-spawnalot.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
use std::os;
1212
use std::task;
1313
use std::uint;
14-
use std::vec_ng::Vec;
1514

1615
fn f(n: uint) {
1716
let mut i = 0u;

src/test/compile-fail/access-mode-in-closures.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use std::vec_ng::Vec;
1211

1312
struct sty(Vec<int> );
1413

src/test/compile-fail/ambig_impl_unify.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use std::vec_ng::Vec;
1211

1312
trait foo {
1413
fn foo(&self) -> int;

src/test/compile-fail/borrowck-init-op-equal.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use std::vec_ng::Vec;
1211

1312
fn test() {
1413
let v: int;

src/test/compile-fail/drop-on-non-struct.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
#[feature(managed_boxes)];
1212

13-
use std::vec_ng::Vec;
1413

1514
type Foo = Vec<u8>;
1615

src/test/compile-fail/import.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
use zed::bar;
1313
use zed::baz;
1414

15-
use std::vec_ng::Vec;
1615

1716
mod zed {
1817
pub fn bar() { println!("bar"); }

src/test/compile-fail/import2.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
use baz::zed::bar; //~ ERROR unresolved import
1212
//~^ ERROR failed to resolve import
1313

14-
use std::vec_ng::Vec;
1514

1615
mod baz {}
1716
mod zed {

src/test/compile-fail/import4.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
// error-pattern: import
1212

13-
use std::vec_ng::Vec;
1413

1514
mod a { pub use b::foo; }
1615
mod b { pub use a::foo; }

src/test/compile-fail/infinite-vec-type-recursion.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
// error-pattern: illegal recursive type
1212

13-
use std::vec_ng::Vec;
1413

1514
type x = Vec<x>;
1615

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

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

11-
// error-pattern:expected `[` but found `~`
11+
// error-pattern:expected `[` but found `vec`
1212
mod blade_runner {
13-
#vec!(doc(
13+
#vec[doc(
1414
brief = "Blade Runner is probably the best movie ever",
1515
desc = "I like that in the world of Blade Runner it is always
1616
raining, and that it's always night time. And Aliens
1717
was also a really good movie.
1818
1919
Alien 3 was crap though."
20-
))
20+
)]
2121
}

0 commit comments

Comments
 (0)