1
Fork 0

Remove outdated and unnecessary std::vec_ng::Vec imports.

(And fix some tests.)
This commit is contained in:
Huon Wilson 2014-03-21 22:37:41 +11:00
parent af79a5aa7d
commit 6d778ff610
168 changed files with 26 additions and 273 deletions

View file

@ -21,7 +21,6 @@ extern crate getopts;
extern crate log;
use std::os;
use std::vec_ng::Vec;
use std::io;
use std::io::fs;
use getopts::{optopt, optflag, reqopt};

View file

@ -9,7 +9,6 @@
// except according to those terms.
use std::io::{BufferedReader, File};
use std::vec_ng::Vec;
pub struct ExpectedError { line: uint, kind: ~str, msg: ~str }

View file

@ -12,8 +12,6 @@ use common::config;
use common;
use util;
use std::vec_ng::Vec;
pub struct TestProps {
// Lines that should be expected, in order, on standard out
error_patterns: Vec<~str> ,

View file

@ -33,8 +33,7 @@ use std::os;
use std::str;
use std::task;
use std::slice;
use std::vec_ng;
use std::vec;
use test::MetricMap;
pub fn run(config: config, testfile: ~str) {

View file

@ -489,7 +489,6 @@ impl<T> Drop for TypedArena<T> {
mod tests {
extern crate test;
use std::vec_ng::Vec;
use self::test::BenchHarness;
use super::{Arena, TypedArena};

View file

@ -903,7 +903,6 @@ mod tests {
use std::result::{Err, Ok};
use std::result;
use std::vec_ng::Vec;
fn check_fail_type(f: Fail_, ft: FailType) {
match f {

View file

@ -583,7 +583,6 @@ mod tests {
use super::{Arc, RWArc, MutexArc, CowArc};
use std::task;
use std::vec_ng::Vec;
#[test]
fn manually_share_arc() {

View file

@ -765,7 +765,6 @@ mod tests {
use std::result;
use std::task;
use std::comm::Empty;
use std::vec_ng::Vec;
/************************************************************************
* Semaphore tests

View file

@ -563,7 +563,7 @@ fn format(val: Param, op: FormatOp, flags: Flags) -> Result<Vec<u8> ,~str> {
mod test {
use super::{expand,String,Variables,Number};
use std::result::Ok;
use std::vec_ng;
use std::vec;
#[test]
fn test_basic_setabf() {

View file

@ -538,7 +538,6 @@ mod test {
Version5Sha1};
use std::str;
use std::io::MemWriter;
use std::vec_ng::Vec;
#[test]
fn test_nil() {

View file

@ -12,7 +12,6 @@
use std::libc;
use std::vec_ng::Vec;
#[link(name="rustrt")]
extern {
pub fn rust_get_test_int() -> libc::intptr_t;

View file

@ -9,7 +9,6 @@
// except according to those terms.
pub mod kitties {
use std::vec_ng::Vec;
pub struct cat<U> {
priv info : Vec<U> ,

View file

@ -11,7 +11,6 @@
#[feature(managed_boxes)];
use std::cell::RefCell;
use std::vec_ng::Vec;
pub struct Entry<A,B> {
key: A,

View file

@ -10,7 +10,6 @@
#[crate_id="cci_no_inline_lib"];
use std::vec_ng::Vec;
// same as cci_iter_lib, more-or-less, but not marked inline
pub fn iter(v: Vec<uint> , f: |uint|) {

View file

@ -15,7 +15,6 @@
extern crate collections;
use std::cell::RefCell;
use std::vec_ng::Vec;
use collections::HashMap;
pub type header_map = HashMap<~str, @RefCell<Vec<@~str>>>;

View file

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use std::vec_ng::Vec;
pub unsafe fn f(xs: Vec<int> ) {
xs.map(|_x| { unsafe fn q() { fail!(); } });

View file

@ -10,7 +10,6 @@
use std::os;
use std::uint;
use std::vec_ng::Vec;
fn main() {
let args = os::args();

View file

@ -24,7 +24,6 @@ use std::comm;
use std::os;
use std::task;
use std::uint;
use std::vec_ng::Vec;
fn move_out<T>(_x: T) {}

View file

@ -19,7 +19,6 @@ extern crate time;
use std::os;
use std::task;
use std::uint;
use std::vec_ng::Vec;
fn move_out<T>(_x: T) {}

View file

@ -23,7 +23,6 @@ use sync::MutexArc;
use sync::Future;
use std::os;
use std::uint;
use std::vec_ng::Vec;
// A poor man's pipe.
type pipe = MutexArc<Vec<uint> >;

View file

@ -22,7 +22,6 @@ use sync::RWArc;
use sync::Future;
use std::os;
use std::uint;
use std::vec_ng::Vec;
// A poor man's pipe.
type pipe = RWArc<Vec<uint> >;

View file

@ -9,7 +9,6 @@
// except according to those terms.
use std::os;
use std::vec_ng::Vec;
fn ack(m: int, n: int) -> int {
if m == 0 {

View file

@ -13,7 +13,6 @@
use std::option;
use std::os;
use std::task;
use std::vec_ng::Vec;
fn print_complements() {
let all = [Blue, Red, Yellow];

View file

@ -18,7 +18,6 @@ use std::io;
use std::io::{BufferedWriter, File};
use std::cmp::min;
use std::os;
use std::vec_ng::Vec;
static LINE_LENGTH: uint = 60;
static IM: u32 = 139968;

View file

@ -9,7 +9,6 @@
// except according to those terms.
use std::os;
use std::vec_ng::Vec;
fn fib(n: int) -> int {
if n < 2 {

View file

@ -24,7 +24,7 @@ use std::os;
use std::io;
use std::str;
use std::task;
use std::slice;
use std::vec;
fn f64_cmp(x: f64, y: f64) -> Ordering {
// arbitrarily decide that NaNs are larger than everything.

View file

@ -12,7 +12,6 @@
// Utilities.
//
use std::vec_ng::Vec;
// returns an infinite iterator of repeated applications of f to x,
// i.e. [x, f(x), f(f(x)), ...], as haskell iterate function.

View file

@ -9,7 +9,6 @@
// except according to those terms.
use std::os;
use std::vec_ng::Vec;
static PI: f64 = 3.141592653589793;
static SOLAR_MASS: f64 = 4.0 * PI * PI;

View file

@ -25,7 +25,6 @@ use std::os;
use std::result::{Ok, Err};
use std::task;
use std::uint;
use std::vec_ng::Vec;
fn fib(n: int) -> int {
fn pfib(tx: &Sender<int>, n: int) {

View file

@ -14,7 +14,6 @@ use std::from_str::FromStr;
use std::iter::count;
use std::cmp::min;
use std::os;
use std::slice::from_elem;
use sync::RWArc;
fn A(i: uint, j: uint) -> f64 {
@ -49,7 +48,7 @@ fn mult(v: RWArc<Vec<f64>>,
spawn(proc() {
for i in range(chk, min(len, chk + chunk)) {
let val = v.read(|v| f(v, i));
out.write(|out| out[i] = val);
out.write(|out| *out.get_mut(i) = val);
}
drop(tx)
});
@ -98,15 +97,16 @@ fn main() {
} else {
FromStr::from_str(args[1]).unwrap()
};
let u = RWArc::new(from_elem(n, 1.));
let v = RWArc::new(from_elem(n, 1.));
let tmp = RWArc::new(from_elem(n, 1.));
let u = RWArc::new(Vec::from_elem(n, 1.));
let v = RWArc::new(Vec::from_elem(n, 1.));
let tmp = RWArc::new(Vec::from_elem(n, 1.));
for _ in range(0, 10) {
mult_AtAv(u.clone(), v.clone(), tmp.clone());
mult_AtAv(v.clone(), u.clone(), tmp.clone());
}
u.read(|u| v.read(|v| {
println!("{:.9f}", (dot(*u, *v) / dot(*v, *v)).sqrt());
println!("{:.9f}",
(dot(u.as_slice(), v.as_slice()) / dot(v.as_slice(), v.as_slice())).sqrt());
}))
}

View file

@ -16,7 +16,6 @@ extern crate time;
use collections::SmallIntMap;
use std::os;
use std::uint;
use std::vec_ng::Vec;
fn append_sequential(min: uint, max: uint, map: &mut SmallIntMap<uint>) {
for i in range(min, max) {

View file

@ -70,6 +70,7 @@ impl Sudoku {
let mut g = Vec::from_fn(10u, { |_i| vec!(0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8) });
for line in reader.lines() {
let line = line.unwrap();
let comps: Vec<&str> = line.trim().split(',').collect();
if comps.len() == 3u {

View file

@ -17,8 +17,7 @@ use collections::list::{List, Cons, Nil};
use time::precise_time_s;
use std::os;
use std::task;
use std::vec_ng::Vec;
use std::vec_ng;
use std::vec;
enum UniqueList {
ULNil, ULCons(~UniqueList)

View file

@ -21,7 +21,6 @@ use std::comm;
use std::os;
use std::task;
use std::uint;
use std::vec_ng::Vec;
fn child_generation(gens_left: uint, tx: comm::Sender<()>) {
// This used to be O(n^2) in the number of generations that ever existed.

View file

@ -11,7 +11,6 @@
use std::os;
use std::task;
use std::uint;
use std::vec_ng::Vec;
fn f(n: uint) {
let mut i = 0u;

View file

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use std::vec_ng::Vec;
struct sty(Vec<int> );

View file

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use std::vec_ng::Vec;
trait foo {
fn foo(&self) -> int;

View file

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use std::vec_ng::Vec;
fn test() {
let v: int;

View file

@ -10,7 +10,6 @@
#[feature(managed_boxes)];
use std::vec_ng::Vec;
type Foo = Vec<u8>;

View file

@ -12,7 +12,6 @@
use zed::bar;
use zed::baz;
use std::vec_ng::Vec;
mod zed {
pub fn bar() { println!("bar"); }

View file

@ -11,7 +11,6 @@
use baz::zed::bar; //~ ERROR unresolved import
//~^ ERROR failed to resolve import
use std::vec_ng::Vec;
mod baz {}
mod zed {

View file

@ -10,7 +10,6 @@
// error-pattern: import
use std::vec_ng::Vec;
mod a { pub use b::foo; }
mod b { pub use a::foo; }

View file

@ -10,7 +10,6 @@
// error-pattern: illegal recursive type
use std::vec_ng::Vec;
type x = Vec<x>;

View file

@ -8,14 +8,14 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// error-pattern:expected `[` but found `~`
// error-pattern:expected `[` but found `vec`
mod blade_runner {
#vec!(doc(
#vec[doc(
brief = "Blade Runner is probably the best movie ever",
desc = "I like that in the world of Blade Runner it is always
raining, and that it's always night time. And Aliens
was also a really good movie.
Alien 3 was crap though."
))
)]
}

View file

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use std::vec_ng::Vec;
trait vec_monad<A> {
fn bind<B>(&self, f: |A| -> Vec<B> );

View file

@ -13,7 +13,6 @@
#[allow(dead_code)];
#[allow(deprecated_owned_vector)];
use std::vec_ng::Vec;
fn fail_len(v: Vec<int> ) -> uint {
let mut i = 3;

View file

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use std::vec_ng::Vec;
struct parser {
tokens: Vec<int> ,

View file

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use std::vec_ng::Vec;
fn main() {
let needlesArr: Vec<char> = vec!('a', 'f');

View file

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use std::vec_ng::Vec;
pub struct CrateId {
local_path: ~str,

View file

@ -10,7 +10,6 @@
// Test which of the builtin types are considered freezeable.
use std::vec_ng::Vec;
fn assert_freeze<T:Freeze>() { }
trait Dummy { }

View file

@ -13,7 +13,6 @@
#[feature(managed_boxes)];
use std::rc::Rc;
use std::vec_ng::Vec;
fn assert_pod<T:Pod>() { }
trait Dummy { }

View file

@ -10,7 +10,6 @@
// Test which of the builtin types are considered sendable.
use std::vec_ng::Vec;
fn assert_send<T:Send>() { }
trait Dummy { }

View file

@ -16,7 +16,6 @@
#[allow(deprecated_owned_vector)];
#[deny(unused_mut)];
use std::vec_ng::Vec;
fn main() {
// negative cases

View file

@ -14,7 +14,6 @@
#[deny(unused_unsafe)];
#[allow(deprecated_owned_vector)];
use std::vec_ng::Vec;
mod foo {
extern {

View file

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use std::vec_ng::Vec;
fn main() {
let x: Vec<(int, int)> = Vec::new();

View file

@ -96,7 +96,7 @@ fn f110() {
fn f120() {
let mut x = vec!(~"hi", ~"ho");
x.swap(0, 1);
x.as_mut_slice().swap(0, 1);
touch(x.get(0));
touch(x.get(1));
}

View file

@ -9,7 +9,6 @@
// except according to those terms.
use std::libc;
use std::vec_ng::Vec;
fn main() {
let x : *Vec<int> = &vec!(1,2,3);

View file

@ -12,8 +12,7 @@
// Issue #876
#[no_implicit_prelude];
use std::vec_ng::Vec;
use std::vec::Vec;
fn last<T>(v: Vec<&T> ) -> std::option::Option<T> {
fail!();

View file

@ -11,7 +11,6 @@
#[feature(managed_boxes)];
use std::cell::Cell;
use std::vec_ng::Vec;
struct r {
i: @Cell<int>,

View file

@ -11,7 +11,6 @@
// ignore-tidy-linelength
use std::fmt;
use std::vec_ng::Vec;
struct Number {
n: i64

View file

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use std::vec_ng::Vec;
fn main() {
let _foo = Vec::new(); //~ ERROR unconstrained type

View file

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use std::vec_ng::Vec;
fn main() {
let v: Vec<int> = vec!(1, 2, 3);

View file

@ -1,34 +0,0 @@
// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-android: FIXME(#10381)
#[feature(managed_boxes)];
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// debugger:finish
// debugger:print unique->fill
// check:$1 = 32
// debugger:print *((uint64_t[4]*)(unique->elements))
// check:$2 = {10, 11, 12, 13}
#[allow(unused_variable)];
fn main() {
let unique: Vec<i64> = vec!(10, 11, 12, 13);
zzz();
}
fn zzz() {()}

View file

@ -9,7 +9,7 @@
// except according to those terms.
fn main() {
let args : Vec<~str> = ::std::os::args();
let args : ~[~str] = ::std::os::args();
::std::io::println(args[0]);
}

View file

@ -17,16 +17,16 @@
// debugger:run
// debugger:finish
// debugger:print unique->elements[0]->val
// debugger:print unique.ptr[0]->val
// check:$1 = 10
// debugger:print unique->elements[1]->val
// debugger:print unique.ptr[1]->val
// check:$2 = 11
// debugger:print unique->elements[2]->val
// debugger:print unique.ptr[2]->val
// check:$3 = 12
// debugger:print unique->elements[3]->val
// debugger:print unique.ptr[3]->val
// check:$4 = 13
#[allow(unused_variable)];

View file

@ -15,7 +15,6 @@
#[feature(managed_boxes)];
use std::cell::Cell;
use std::vec_ng::Vec;
fn test1() { let val = @0; { } *val; }

View file

@ -12,7 +12,6 @@
#[allow(unreachable_code)];
#[allow(unused_variable)];
use std::vec_ng::Vec;
// error-pattern:so long
fn main() {

View file

@ -15,8 +15,7 @@
extern crate collections;
use std::vec_ng::Vec;
use std::vec_ng;
use std::vec;
fn main() {
let _count = @0u;

View file

@ -12,7 +12,6 @@
#[feature(managed_boxes)];
use std::vec_ng::Vec;
fn f() -> Vec<int> { fail!(); }

View file

@ -12,7 +12,6 @@
#[feature(managed_boxes)];
use std::vec_ng::Vec;
fn f() -> Vec<int> { fail!(); }

View file

@ -12,7 +12,6 @@
#[feature(managed_boxes)];
use std::vec_ng::Vec;
fn f() -> Vec<int> { fail!(); }

View file

@ -10,7 +10,6 @@
// error-pattern:fail
use std::vec_ng::Vec;
fn build() -> Vec<int> {
fail!();

View file

@ -10,7 +10,6 @@
// error-pattern:fail
use std::vec_ng::Vec;
fn build1() -> Vec<int> {
vec!(0,0,0,0,0,0,0)

View file

@ -10,7 +10,6 @@
#[feature(managed_boxes)];
use std::vec_ng::Vec;
// error-pattern:fail

View file

@ -10,7 +10,6 @@
#[feature(managed_boxes)];
use std::vec_ng::Vec;
// error-pattern:fail

View file

@ -10,7 +10,6 @@
// error-pattern:index out of bounds: the len is 1 but the index is 2
use std::vec_ng::Vec;
fn main() {
let v: Vec<int> = vec!(10);

View file

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use std::vec_ng::Vec;
enum option<T> { some(T), none, }

View file

@ -12,7 +12,6 @@
// making method calls, but only if there aren't any matches without
// it.
use std::vec_ng::Vec;
trait iterable<A> {
fn iterate(&self, blk: |x: &A| -> bool) -> bool;

View file

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use std::vec_ng::Vec;
trait Pushable<T> {
fn push_val(&mut self, t: T);

View file

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use std::vec_ng::Vec;
fn f<T>(x: Vec<T>) -> T { return x.move_iter().next().unwrap(); }

View file

@ -10,7 +10,6 @@
// ignore-fast
use std::vec_ng::Vec;
fn iter_vec<T>(v: Vec<T> , f: |&T|) { for x in v.iter() { f(x); } }

View file

@ -10,7 +10,6 @@
// ignore-fast
use std::vec_ng::Vec;
fn iter_vec<T>(v: Vec<T> , f: |&T|) { for x in v.iter() { f(x); } }

View file

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use std::vec_ng::Vec;
trait Foo {
fn foo(self);

View file

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use std::vec_ng::Vec;
struct F { f: Vec<int> }

View file

@ -9,7 +9,6 @@
// except according to those terms.
use std::mem::swap;
use std::vec_ng::Vec;
struct Ints {sum: ~int, values: Vec<int> }

View file

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use std::vec_ng::Vec;
fn want_slice(v: &[int]) -> int {
let mut sum = 0;

View file

@ -10,7 +10,6 @@
#[feature(managed_boxes)];
use std::vec_ng::Vec;
struct F { f: @G }
struct G { g: Vec<int> }

View file

@ -10,7 +10,6 @@
#[feature(managed_boxes)];
use std::vec_ng::Vec;
fn borrow<'r,T>(x: &'r T) -> &'r T {x}

View file

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use std::vec_ng::Vec;
fn foo() -> int { 22 }

View file

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use std::vec_ng::Vec;
struct cat<U> {
info : Vec<U> ,

View file

@ -15,7 +15,6 @@
#[feature(macro_rules)];
use std::ops::Drop;
use std::vec_ng::Vec;
static mut FLAGS: u64 = 0;

View file

@ -25,7 +25,6 @@
// scenario worth testing.
use std::task;
use std::vec_ng::Vec;
enum Conzabble {
Bickwick(Foo)

View file

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use std::vec_ng::Vec;
fn bar(v: &mut [uint]) -> Vec<uint> {
Vec::from_slice(v)

View file

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use std::vec_ng::Vec;
fn reverse(v: &mut [uint]) {
v.reverse();

View file

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use std::vec_ng::Vec;
fn bar(v: &mut [uint]) {
v.reverse();

View file

@ -10,6 +10,5 @@
#[allow(unused_mut)];
use std::vec_ng::Vec;
pub fn main() { let mut _v: Vec<int> = Vec::new(); }

View file

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use std::vec_ng::Vec;
fn test_int() {
fn f() -> int { 10 }

View file

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use std::vec_ng::Vec;
fn test_simple() {
let r = match true { true => { true } false => { fail!() } };

View file

@ -8,6 +8,5 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use std::vec_ng::Vec;
pub fn main() { let x: Vec<int> = Vec::new(); for _ in x.iter() { fail!("moop"); } }

View file

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use std::vec_ng::Vec;
fn two(it: |int|) { it(0); it(1); }

Some files were not shown because too many files have changed in this diff Show more