diff --git a/src/test/compile-fail/auto-ref-slice-plus-ref.rs b/src/test/compile-fail/auto-ref-slice-plus-ref.rs index 311becc63ef..6a0f5a39202 100644 --- a/src/test/compile-fail/auto-ref-slice-plus-ref.rs +++ b/src/test/compile-fail/auto-ref-slice-plus-ref.rs @@ -17,7 +17,7 @@ fn main() { // reference. That would allow creating a mutable pointer to a // temporary, which would be a source of confusion - let mut a = @[0]; + let mut a = ~[0]; a.test_mut(); //~ ERROR does not implement any method in scope named `test_mut` } diff --git a/src/test/compile-fail/drop-on-non-struct.rs b/src/test/compile-fail/drop-on-non-struct.rs index ff901f986e6..0d01fe4e8c7 100644 --- a/src/test/compile-fail/drop-on-non-struct.rs +++ b/src/test/compile-fail/drop-on-non-struct.rs @@ -10,7 +10,7 @@ #[feature(managed_boxes)]; -type Foo = @[u8]; +type Foo = ~[u8]; impl Drop for Foo { //~ ERROR the Drop trait may only be implemented //~^ ERROR cannot provide an extension implementation diff --git a/src/test/compile-fail/evec-subtyping.rs b/src/test/compile-fail/evec-subtyping.rs index da324e1dc20..9a0227b7d31 100644 --- a/src/test/compile-fail/evec-subtyping.rs +++ b/src/test/compile-fail/evec-subtyping.rs @@ -10,30 +10,20 @@ #[feature(managed_boxes)]; -fn wants_box(x: @[uint]) { } fn wants_uniq(x: ~[uint]) { } fn wants_three(x: [uint, ..3]) { } -fn has_box(x: @[uint]) { - wants_box(x); - wants_uniq(x); //~ ERROR [] storage differs: expected `~` but found `@` - wants_three(x); //~ ERROR [] storage differs: expected `3` but found `@` -} - fn has_uniq(x: ~[uint]) { - wants_box(x); //~ ERROR [] storage differs: expected `@` but found `~` wants_uniq(x); wants_three(x); //~ ERROR [] storage differs: expected `3` but found `~` } fn has_three(x: [uint, ..3]) { - wants_box(x); //~ ERROR [] storage differs: expected `@` but found `3` wants_uniq(x); //~ ERROR [] storage differs: expected `~` but found `3` wants_three(x); } fn has_four(x: [uint, ..4]) { - wants_box(x); //~ ERROR [] storage differs: expected `@` but found `4` wants_uniq(x); //~ ERROR [] storage differs: expected `~` but found `4` wants_three(x); //~ ERROR [] storage differs: expected `3` but found `4` } diff --git a/src/test/compile-fail/issue-10487.rs b/src/test/compile-fail/issue-10487.rs index 302e883942e..3fc6106f748 100644 --- a/src/test/compile-fail/issue-10487.rs +++ b/src/test/compile-fail/issue-10487.rs @@ -11,6 +11,5 @@ #[feature(managed_boxes)]; static x: ~[int] = ~[123, 456]; //~ ERROR: cannot allocate vectors in constant expressions -static y: @[int] = @[123, 456]; //~ ERROR: cannot allocate vectors in constant expressions fn main() {} diff --git a/src/test/compile-fail/lint-heap-memory.rs b/src/test/compile-fail/lint-heap-memory.rs index 5e8c83558fb..8899f3f5dbb 100644 --- a/src/test/compile-fail/lint-heap-memory.rs +++ b/src/test/compile-fail/lint-heap-memory.rs @@ -22,8 +22,7 @@ fn main() { let _x : Bar = Bar {x : ~10}; //~ ERROR type uses owned @2; //~ ERROR type uses managed - @[1]; //~ ERROR type uses managed - //~^ ERROR type uses managed + fn f(_: @Clone) {} //~ ERROR type uses managed ~2; //~ ERROR type uses owned diff --git a/src/test/compile-fail/moves-based-on-type-exprs.rs b/src/test/compile-fail/moves-based-on-type-exprs.rs index 34e506ed015..4e2391ea25f 100644 --- a/src/test/compile-fail/moves-based-on-type-exprs.rs +++ b/src/test/compile-fail/moves-based-on-type-exprs.rs @@ -72,12 +72,6 @@ fn f80() { touch(&x); //~ ERROR use of moved value: `x` } -fn f90() { - let x = ~"hi"; - let _y = @[x]; - touch(&x); //~ ERROR use of moved value: `x` -} - fn f100() { let x = ~[~"hi"]; let _y = x[0]; diff --git a/src/test/debug-info/boxed-vec.rs b/src/test/debug-info/boxed-vec.rs index d7756c00dab..2c0edb783f8 100644 --- a/src/test/debug-info/boxed-vec.rs +++ b/src/test/debug-info/boxed-vec.rs @@ -17,21 +17,15 @@ // debugger:run // debugger:finish -// debugger:print managed->val.fill -// check:$1 = 24 -// debugger:print *((uint64_t[3]*)(managed->val.elements)) -// check:$2 = {7, 8, 9} - // debugger:print unique->fill -// check:$3 = 32 +// check:$1 = 32 // debugger:print *((uint64_t[4]*)(unique->elements)) -// check:$4 = {10, 11, 12, 13} +// check:$2 = {10, 11, 12, 13} #[allow(unused_variable)]; fn main() { - let managed: @[i64] = @[7, 8, 9]; let unique: ~[i64] = ~[10, 11, 12, 13]; zzz(); diff --git a/src/test/run-pass/auto-encode.rs b/src/test/run-pass/auto-encode.rs index 5f697b7e514..f3af7d652cd 100644 --- a/src/test/run-pass/auto-encode.rs +++ b/src/test/run-pass/auto-encode.rs @@ -144,9 +144,6 @@ pub fn main() { let a = &Point {x: 3u, y: 5u}; test_ebml(a); - let a = &@[1u, 2u, 3u]; - test_ebml(a); - let a = &Top(22u); test_ebml(a); diff --git a/src/test/run-pass/auto-ref-slice-plus-ref.rs b/src/test/run-pass/auto-ref-slice-plus-ref.rs index 7bcf98c3f41..c22e25e5d95 100644 --- a/src/test/run-pass/auto-ref-slice-plus-ref.rs +++ b/src/test/run-pass/auto-ref-slice-plus-ref.rs @@ -30,7 +30,6 @@ pub fn main() { ([1]).test_imm(); (~[1]).test_imm(); - (@[1]).test_imm(); (&[1]).test_imm(); ("test").test_imm(); (~"test").test_imm(); diff --git a/src/test/run-pass/borrowck-borrow-from-at-vec.rs b/src/test/run-pass/borrowck-borrow-from-at-vec.rs deleted file mode 100644 index 5ae959ef169..00000000000 --- a/src/test/run-pass/borrowck-borrow-from-at-vec.rs +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2012 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 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -#[feature(managed_boxes)]; - -fn sum_slice(x: &[int]) -> int { - let mut sum = 0; - for i in x.iter() { sum += *i; } - return sum; -} - -pub fn main() { - let x = @[1, 2, 3]; - assert_eq!(sum_slice(x), 6); -} diff --git a/src/test/run-pass/expr-repeat-vstore.rs b/src/test/run-pass/expr-repeat-vstore.rs index 28fd5dbfa8d..c841297e19f 100644 --- a/src/test/run-pass/expr-repeat-vstore.rs +++ b/src/test/run-pass/expr-repeat-vstore.rs @@ -7,10 +7,4 @@ pub fn main() { println!("{}", v[2]); println!("{}", v[3]); println!("{}", v[4]); - let v: @[int] = @[ 2, ..5 ]; - println!("{}", v[0]); - println!("{}", v[1]); - println!("{}", v[2]); - println!("{}", v[3]); - println!("{}", v[4]); } diff --git a/src/test/run-pass/issue-5926.rs b/src/test/run-pass/issue-5926.rs deleted file mode 100644 index ffb7a0a5bb3..00000000000 --- a/src/test/run-pass/issue-5926.rs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2013 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 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -#[feature(managed_boxes)]; -#[allow(unused_mut)]; - -pub fn main() { - let mut your_favorite_numbers = @[1,2,3]; - let mut my_favorite_numbers = @[4,5,6]; - let f = your_favorite_numbers + my_favorite_numbers; - println!("The third favorite number is {:?}.", f) -} - diff --git a/src/test/run-pass/issue-9382.rs b/src/test/run-pass/issue-9382.rs index f6bbd8ebef8..c5123f23116 100644 --- a/src/test/run-pass/issue-9382.rs +++ b/src/test/run-pass/issue-9382.rs @@ -35,10 +35,6 @@ pub fn main() { baz: ~[], bar: ~32, }; - let _t1_at = Thing1 { - baz: @[], - bar: ~32, - }; let _t2_fixed = Thing2 { baz: &[], bar: 32, @@ -47,8 +43,4 @@ pub fn main() { baz: ~[], bar: 32, }; - let _t2_at = Thing2 { - baz: @[], - bar: 32, - }; } diff --git a/src/test/run-pass/nullable-pointer-iotareduction.rs b/src/test/run-pass/nullable-pointer-iotareduction.rs index 32803283bf9..7d8d5d635f9 100644 --- a/src/test/run-pass/nullable-pointer-iotareduction.rs +++ b/src/test/run-pass/nullable-pointer-iotareduction.rs @@ -80,8 +80,6 @@ pub fn main() { check_type!(@19: @int); check_type!(~"foo": ~str); check_type!(~[20, 22]: ~[int]); - check_type!(@[]: @[int]); - check_type!(@[24, 26]: @[int]); let mint: uint = unsafe { cast::transmute(main) }; check_type!(main: extern fn(), |pthing| { assert!(mint == unsafe { cast::transmute(*pthing) }) diff --git a/src/test/run-pass/nullable-pointer-size.rs b/src/test/run-pass/nullable-pointer-size.rs index 5117d0849fb..84a6baa5de8 100644 --- a/src/test/run-pass/nullable-pointer-size.rs +++ b/src/test/run-pass/nullable-pointer-size.rs @@ -42,6 +42,5 @@ pub fn main() { check_type!(@int); check_type!(~str); check_type!(~[int]); - check_type!(@[int]); check_type!(extern fn()); } diff --git a/src/test/run-pass/packed-struct-generic-size.rs b/src/test/run-pass/packed-struct-generic-size.rs index cba923ef646..0b6ab579e6b 100644 --- a/src/test/run-pass/packed-struct-generic-size.rs +++ b/src/test/run-pass/packed-struct-generic-size.rs @@ -22,6 +22,6 @@ pub fn main() { assert_eq!(mem::size_of::>(), 11); - assert_eq!(mem::size_of::>(), - 1 + mem::size_of::<~str>() + mem::size_of::<@[int]>()); + assert_eq!(mem::size_of::>(), + 1 + mem::size_of::<~str>() + mem::size_of::<~[int]>()); } diff --git a/src/test/run-pass/reflect-visit-data.rs b/src/test/run-pass/reflect-visit-data.rs index 38000a43518..6a817bf03d4 100644 --- a/src/test/run-pass/reflect-visit-data.rs +++ b/src/test/run-pass/reflect-visit-data.rs @@ -252,9 +252,6 @@ impl TyVisitor for ptr_visit_adaptor { } fn visit_evec_box(&mut self, mtbl: uint, inner: *TyDesc) -> bool { - self.align_to::<@[u8]>(); - if ! self.inner().visit_evec_box(mtbl, inner) { return false; } - self.bump_past::<@[u8]>(); true } diff --git a/src/test/run-pass/regions-borrow-evec-at.rs b/src/test/run-pass/regions-borrow-evec-at.rs deleted file mode 100644 index 3c0fcba2064..00000000000 --- a/src/test/run-pass/regions-borrow-evec-at.rs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2012 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 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -#[feature(managed_boxes)]; - -fn foo(x: &[uint]) -> uint { - x[0] -} - -pub fn main() { - let p = @[22u]; - let r = foo(p); - assert_eq!(r, 22u); -} diff --git a/src/test/run-pass/repeated-vector-syntax.rs b/src/test/run-pass/repeated-vector-syntax.rs index 03497de0d55..9f206990843 100644 --- a/src/test/run-pass/repeated-vector-syntax.rs +++ b/src/test/run-pass/repeated-vector-syntax.rs @@ -16,7 +16,7 @@ struct Foo { } pub fn main() { - let x = [ @[true], ..512 ]; + let x = [ [true], ..512 ]; let y = [ 0, ..1 ]; error!("{:?}", x); diff --git a/src/test/run-pass/vec-matching-autoslice.rs b/src/test/run-pass/vec-matching-autoslice.rs index cd9d9603ffb..68d2ce36463 100644 --- a/src/test/run-pass/vec-matching-autoslice.rs +++ b/src/test/run-pass/vec-matching-autoslice.rs @@ -1,7 +1,5 @@ -#[feature(managed_boxes)]; - pub fn main() { - let x = @[1, 2, 3]; + let x = ~[1, 2, 3]; match x { [2, ..] => fail!(), [1, ..tail] => { diff --git a/src/test/run-pass/vec-to_str.rs b/src/test/run-pass/vec-to_str.rs index 16a895f7231..e25b4de0a11 100644 --- a/src/test/run-pass/vec-to_str.rs +++ b/src/test/run-pass/vec-to_str.rs @@ -8,19 +8,13 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(managed_boxes)]; - pub fn main() { assert_eq!((~[0, 1]).to_str(), ~"[0, 1]"); assert_eq!((&[1, 2]).to_str(), ~"[1, 2]"); - assert_eq!((@[2, 3]).to_str(), ~"[2, 3]"); let foo = ~[3, 4]; let bar = &[4, 5]; - let baz = @[5, 6]; assert_eq!(foo.to_str(), ~"[3, 4]"); assert_eq!(bar.to_str(), ~"[4, 5]"); - assert_eq!(baz.to_str(), ~"[5, 6]"); - }