about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-06-11 15:36:59 -0700
committerbors <bors@rust-lang.org>2014-06-11 15:36:59 -0700
commitceaeb667b327cff7ad286255d68cb5a8ba8a4d7c (patch)
treec94cde854a882cad33d8ec7fe0067b43b5cb96d7 /src/test
parentf9260d41d6e37653bf71b08a041be0310098716a (diff)
parent3316b1eb7c3eb520896af489dd45c4d17190d0a8 (diff)
downloadrust-ceaeb667b327cff7ad286255d68cb5a8ba8a4d7c.tar.gz
rust-ceaeb667b327cff7ad286255d68cb5a8ba8a4d7c.zip
auto merge of #14703 : alexcrichton/rust/no-more-owned-vectors, r=brson
The following features have been removed

* `box [a, b, c]`
* `~[a, b, c]`
* `box [a, ..N]`
* `~[a, ..N]`
* `~[T]` (as a type)
* deprecated_owned_vector lint

All users of ~[T] should move to using Vec<T> instead.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/bench/shootout-regex-dna.rs4
-rw-r--r--src/test/compile-fail/borrowck-use-in-index-lvalue.rs5
-rw-r--r--src/test/compile-fail/issue-2150.rs2
-rw-r--r--src/test/compile-fail/lint-deprecated-owned-vector.rs16
-rw-r--r--src/test/compile-fail/lint-heap-memory.rs1
-rw-r--r--src/test/compile-fail/lint-unused-imports.rs1
-rw-r--r--src/test/compile-fail/lint-unused-mut-variables.rs1
-rw-r--r--src/test/compile-fail/lint-unused-unsafe.rs1
-rw-r--r--src/test/run-pass/empty-allocation-non-null.rs3
-rw-r--r--src/test/run-pass/ifmt.rs1
-rw-r--r--src/test/run-pass/overloaded-autoderef.rs2
-rw-r--r--src/test/run-pass/reflect-visit-type.rs9
12 files changed, 5 insertions, 41 deletions
diff --git a/src/test/bench/shootout-regex-dna.rs b/src/test/bench/shootout-regex-dna.rs
index 64f3e633d03..19b9d5638d0 100644
--- a/src/test/bench/shootout-regex-dna.rs
+++ b/src/test/bench/shootout-regex-dna.rs
@@ -75,7 +75,7 @@ fn main() {
     let clen = seq.len();
 
     let mut seqlen = Future::spawn(proc() {
-        let substs = ~[
+        let substs = vec![
             (regex!("B"), "(c|g|t)"),
             (regex!("D"), "(a|g|t)"),
             (regex!("H"), "(a|c|t)"),
@@ -95,7 +95,7 @@ fn main() {
         seq.len()
     });
 
-    let variants = ~[
+    let variants = vec![
         regex!("agggtaaa|tttaccct"),
         regex!("[cgt]gggtaaa|tttaccc[acg]"),
         regex!("a[act]ggtaaa|tttacc[agt]t"),
diff --git a/src/test/compile-fail/borrowck-use-in-index-lvalue.rs b/src/test/compile-fail/borrowck-use-in-index-lvalue.rs
index 3ced9859240..3cd582ca0b8 100644
--- a/src/test/compile-fail/borrowck-use-in-index-lvalue.rs
+++ b/src/test/compile-fail/borrowck-use-in-index-lvalue.rs
@@ -9,11 +9,10 @@
 // except according to those terms.
 
 fn test() {
-    let w: ~[int];
+    let w: &mut [int];
     w[5] = 0; //~ ERROR use of possibly uninitialized variable: `w`
-              //~^ ERROR cannot assign to immutable vec content `w[..]`
 
-    let mut w: ~[int];
+    let mut w: &mut [int];
     w[5] = 0; //~ ERROR use of possibly uninitialized variable: `w`
 }
 
diff --git a/src/test/compile-fail/issue-2150.rs b/src/test/compile-fail/issue-2150.rs
index b12e6799e6a..7457a1020ce 100644
--- a/src/test/compile-fail/issue-2150.rs
+++ b/src/test/compile-fail/issue-2150.rs
@@ -11,8 +11,6 @@
 #![deny(unreachable_code)]
 #![allow(unused_variable)]
 #![allow(dead_code)]
-#![allow(deprecated_owned_vector)]
-
 
 fn fail_len(v: Vec<int> ) -> uint {
     let mut i = 3;
diff --git a/src/test/compile-fail/lint-deprecated-owned-vector.rs b/src/test/compile-fail/lint-deprecated-owned-vector.rs
deleted file mode 100644
index 537f3c9f48a..00000000000
--- a/src/test/compile-fail/lint-deprecated-owned-vector.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 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.
-
-#![deny(deprecated_owned_vector)]
-
-fn main() {
-    ~[1]; //~ ERROR use of deprecated `~[]`
-    //~^ ERROR use of deprecated `~[]`
-}
diff --git a/src/test/compile-fail/lint-heap-memory.rs b/src/test/compile-fail/lint-heap-memory.rs
index ae18e9bebad..26cae1aa708 100644
--- a/src/test/compile-fail/lint-heap-memory.rs
+++ b/src/test/compile-fail/lint-heap-memory.rs
@@ -11,7 +11,6 @@
 #![feature(managed_boxes)]
 #![forbid(heap_memory)]
 #![allow(dead_code)]
-#![allow(deprecated_owned_vector)]
 
 
 struct Foo {
diff --git a/src/test/compile-fail/lint-unused-imports.rs b/src/test/compile-fail/lint-unused-imports.rs
index cb05c283334..4334d2f63ea 100644
--- a/src/test/compile-fail/lint-unused-imports.rs
+++ b/src/test/compile-fail/lint-unused-imports.rs
@@ -11,7 +11,6 @@
 #![feature(globs)]
 #![deny(unused_imports)]
 #![allow(dead_code)]
-#![allow(deprecated_owned_vector)]
 
 use cal = bar::c::cc;
 
diff --git a/src/test/compile-fail/lint-unused-mut-variables.rs b/src/test/compile-fail/lint-unused-mut-variables.rs
index 671fecc4e22..d5f34669a25 100644
--- a/src/test/compile-fail/lint-unused-mut-variables.rs
+++ b/src/test/compile-fail/lint-unused-mut-variables.rs
@@ -13,7 +13,6 @@
 #![allow(dead_assignment)]
 #![allow(unused_variable)]
 #![allow(dead_code)]
-#![allow(deprecated_owned_vector)]
 #![deny(unused_mut)]
 
 
diff --git a/src/test/compile-fail/lint-unused-unsafe.rs b/src/test/compile-fail/lint-unused-unsafe.rs
index 7c459434bca..8ae3f1fdd0d 100644
--- a/src/test/compile-fail/lint-unused-unsafe.rs
+++ b/src/test/compile-fail/lint-unused-unsafe.rs
@@ -12,7 +12,6 @@
 
 #![allow(dead_code)]
 #![deny(unused_unsafe)]
-#![allow(deprecated_owned_vector)]
 
 
 mod foo {
diff --git a/src/test/run-pass/empty-allocation-non-null.rs b/src/test/run-pass/empty-allocation-non-null.rs
index a6baf21549e..15544468ae9 100644
--- a/src/test/run-pass/empty-allocation-non-null.rs
+++ b/src/test/run-pass/empty-allocation-non-null.rs
@@ -13,7 +13,4 @@ pub fn main() {
 
     struct Foo;
     assert!(Some(box Foo).is_some());
-
-    let xs: ~[()] = ~[];
-    assert!(Some(xs).is_some());
 }
diff --git a/src/test/run-pass/ifmt.rs b/src/test/run-pass/ifmt.rs
index b69450024f6..7078518bebc 100644
--- a/src/test/run-pass/ifmt.rs
+++ b/src/test/run-pass/ifmt.rs
@@ -13,7 +13,6 @@
 #![feature(macro_rules, managed_boxes)]
 #![deny(warnings)]
 #![allow(unused_must_use)]
-#![allow(deprecated_owned_vector)]
 
 extern crate debug;
 
diff --git a/src/test/run-pass/overloaded-autoderef.rs b/src/test/run-pass/overloaded-autoderef.rs
index 782cea2979f..cd5903ad4e3 100644
--- a/src/test/run-pass/overloaded-autoderef.rs
+++ b/src/test/run-pass/overloaded-autoderef.rs
@@ -45,7 +45,7 @@ pub fn main() {
     p.borrow_mut().y += 3;
     assert_eq!(*p.borrow(), Point {x: 3, y: 5});
 
-    let v = Rc::new(RefCell::new(~[1, 2, 3]));
+    let v = Rc::new(RefCell::new([1, 2, 3]));
     v.borrow_mut()[0] = 3;
     v.borrow_mut()[1] += 3;
     assert_eq!((v.borrow()[0], v.borrow()[1], v.borrow()[2]), (3, 5, 3));
diff --git a/src/test/run-pass/reflect-visit-type.rs b/src/test/run-pass/reflect-visit-type.rs
index 6fbb311593b..b471d13901e 100644
--- a/src/test/run-pass/reflect-visit-type.rs
+++ b/src/test/run-pass/reflect-visit-type.rs
@@ -62,8 +62,6 @@ impl TyVisitor for MyVisitor {
 
     fn visit_char(&mut self) -> bool { true }
 
-    fn visit_estr_box(&mut self) -> bool { true }
-    fn visit_estr_uniq(&mut self) -> bool { true }
     fn visit_estr_slice(&mut self) -> bool { true }
     fn visit_estr_fixed(&mut self,
                         _sz: uint, _sz2: uint,
@@ -74,13 +72,6 @@ impl TyVisitor for MyVisitor {
     fn visit_ptr(&mut self, _mtbl: uint, _inner: *TyDesc) -> bool { true }
     fn visit_rptr(&mut self, _mtbl: uint, _inner: *TyDesc) -> bool { true }
 
-    fn visit_evec_box(&mut self, _mtbl: uint, _inner: *TyDesc) -> bool { true }
-    fn visit_evec_uniq(&mut self, _mtbl: uint, inner: *TyDesc) -> bool {
-        self.types.push("[".to_string());
-        unsafe { visit_tydesc(inner, &mut *self as &mut TyVisitor); }
-        self.types.push("]".to_string());
-        true
-    }
     fn visit_evec_slice(&mut self, _mtbl: uint, _inner: *TyDesc) -> bool { true }
     fn visit_evec_fixed(&mut self, _n: uint, _sz: uint, _align: uint,
                         _mtbl: uint, _inner: *TyDesc) -> bool { true }