]> git.lizzy.rs Git - rust.git/commitdiff
test: Remove `@str` from the test suite
authorPatrick Walton <pcwalton@mimiga.net>
Sat, 1 Feb 2014 00:20:57 +0000 (16:20 -0800)
committerHuon Wilson <dbau.pp+github@gmail.com>
Sat, 1 Feb 2014 14:44:49 +0000 (01:44 +1100)
14 files changed:
src/test/compile-fail/estr-subtyping.rs
src/test/compile-fail/lint-heap-memory.rs
src/test/run-pass/auto-ref-slice-plus-ref.rs
src/test/run-pass/borrowed-ptr-pattern-infallible.rs
src/test/run-pass/borrowed-ptr-pattern.rs
src/test/run-pass/estr-shared.rs [deleted file]
src/test/run-pass/ifmt.rs
src/test/run-pass/issue-3574.rs
src/test/run-pass/issue-4092.rs [deleted file]
src/test/run-pass/match-borrowed_str.rs
src/test/run-pass/nullable-pointer-iotareduction.rs
src/test/run-pass/nullable-pointer-size.rs
src/test/run-pass/reflect-visit-data.rs
src/test/run-pass/send_str_hashmap.rs

index 7dc99074f72f1779f5f5ed3cdb0877daccba87c2..d99d29fb810803c94529d3e644d95c7f5cb63568 100644 (file)
@@ -8,26 +8,15 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#[feature(managed_boxes)];
-
-fn wants_box(x: @str) { }
 fn wants_uniq(x: ~str) { }
 fn wants_slice(x: &str) { }
 
-fn has_box(x: @str) {
-   wants_box(x);
-   wants_uniq(x); //~ ERROR str storage differs: expected `~` but found `@`
-   wants_slice(x);
-}
-
 fn has_uniq(x: ~str) {
-   wants_box(x); //~ ERROR str storage differs: expected `@` but found `~`
    wants_uniq(x);
    wants_slice(x);
 }
 
 fn has_slice(x: &str) {
-   wants_box(x); //~ ERROR str storage differs: expected `@` but found `&`
    wants_uniq(x); //~ ERROR str storage differs: expected `~` but found `&`
    wants_slice(x);
 }
index c02da1beeb7323391b33cd6cf655d7bd2f5ff863..0c19988bef4263ef57919c2c44f2ffeee7eb7622 100644 (file)
@@ -25,7 +25,6 @@ fn main() {
     @[1]; //~ ERROR type uses managed
     //~^ ERROR type uses managed
     fn f(_: @Clone) {} //~ ERROR type uses managed
-    @""; //~ ERROR type uses managed
     //~^ ERROR type uses managed
 
     ~2; //~ ERROR type uses owned
index eae791b6b08a62294b11fff47d469c7ce831e05e..7bcf98c3f41bcbd4b29bcc218fec87991552a9f0 100644 (file)
@@ -34,7 +34,6 @@ pub fn main() {
     (&[1]).test_imm();
     ("test").test_imm();
     (~"test").test_imm();
-    (@"test").test_imm();
     (&"test").test_imm();
 
     // FIXME: Other types of mutable vecs don't currently exist
index 77484b8da4a7de415f704c4c4d3823c094cb0332..07a13e5395fc3c1d363218db177a087691292c17 100644 (file)
@@ -11,8 +11,7 @@
 #[feature(managed_boxes)];
 
 pub fn main() {
-    let (&x, &y, &z) = (&3, &'a', &@"No pets!");
+    let (&x, &y) = (&3, &'a');
     assert_eq!(x, 3);
     assert_eq!(y, 'a');
-    assert_eq!(z, @"No pets!");
 }
index 11751ed6ade3b271dde772d81dc0edf85d92262b..7ccb40c8e7b37b4475e735dce12ed6ae70cbee60 100644 (file)
@@ -17,5 +17,4 @@ fn foo<T:Clone>(x: &T) -> T{
 pub fn main() {
     assert_eq!(foo(&3), 3);
     assert_eq!(foo(&'a'), 'a');
-    assert_eq!(foo(&@"Dogs rule, cats drool"), @"Dogs rule, cats drool");
 }
diff --git a/src/test/run-pass/estr-shared.rs b/src/test/run-pass/estr-shared.rs
deleted file mode 100644 (file)
index 73837a4..0000000
+++ /dev/null
@@ -1,15 +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 <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.
-
-#[feature(managed_boxes)];
-
-pub fn main() {
-    let _x : @str = @"hello";
-}
index 610cba1eb1fa63389d08456db5165331c7cc84c7..cc59ce5d8b24589b384c6b94fcf06c4079e6f83b 100644 (file)
@@ -58,7 +58,6 @@ pub fn main() {
     t!(format!("{}", 1.0f64), "1");
     t!(format!("{}", "a"), "a");
     t!(format!("{}", ~"a"), "a");
-    t!(format!("{}", @"a"), "a");
     t!(format!("{}", false), "false");
     t!(format!("{}", 'a'), "a");
 
@@ -73,7 +72,6 @@ pub fn main() {
     t!(format!("{:X}", 10u), "A");
     t!(format!("{:s}", "foo"), "foo");
     t!(format!("{:s}", ~"foo"), "foo");
-    t!(format!("{:s}", @"foo"), "foo");
     t!(format!("{:p}", 0x1234 as *int), "0x1234");
     t!(format!("{:p}", 0x1234 as *mut int), "0x1234");
     t!(format!("{:d}", A), "aloha");
index eb59b3e12b61047c0d472296e3a14fb676eaffbf..ace27c5ea11f61ad56e2f17bd20aacf367721a26 100644 (file)
@@ -26,5 +26,4 @@ pub fn main()
 {
     assert!(compare("foo", "foo"));
     assert!(compare(~"foo", ~"foo"));
-    assert!(compare(@"foo", @"foo"));
 }
diff --git a/src/test/run-pass/issue-4092.rs b/src/test/run-pass/issue-4092.rs
deleted file mode 100644 (file)
index 62174a7..0000000
+++ /dev/null
@@ -1,18 +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 <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.
-
-#[feature(managed_boxes)];
-
-use std::hashmap::HashMap;
-
-pub fn main() {
-    let mut x = HashMap::new();
-    x.insert((@"abc", 0), 0);
-}
index acff2de548eed2c328cc6753bf0da0b34b6edf03..b0f31f70f53c0e4803e68f44fedaa3abce373a7f 100644 (file)
@@ -43,19 +43,15 @@ fn g2(ref_1: &str, ref_2: &str) -> ~str {
 }
 
 pub fn main() {
-    assert_eq!(f1(@"a"), ~"found a");
     assert_eq!(f1(~"b"), ~"found b");
     assert_eq!(f1(&"c"), ~"not found");
     assert_eq!(f1("d"), ~"not found");
-    assert_eq!(f2(@"a"), ~"found a");
     assert_eq!(f2(~"b"), ~"found b");
     assert_eq!(f2(&"c"), ~"not found (c)");
     assert_eq!(f2("d"), ~"not found (d)");
-    assert_eq!(g1(@"a", @"b"), ~"found a,b");
     assert_eq!(g1(~"b", ~"c"), ~"found b,c");
     assert_eq!(g1(&"c", &"d"), ~"not found");
     assert_eq!(g1("d", "e"), ~"not found");
-    assert_eq!(g2(@"a", @"b"), ~"found a,b");
     assert_eq!(g2(~"b", ~"c"), ~"found b,c");
     assert_eq!(g2(&"c", &"d"), ~"not found (c, d)");
     assert_eq!(g2("d", "e"), ~"not found (d, e)");
index acb7fe12360e1607ca6c676de9a8291ac4f1f555..32803283bf94096e69dd518fb3195e9f30613487 100644 (file)
@@ -79,7 +79,6 @@ pub fn main() {
     check_type!(~18: ~int);
     check_type!(@19: @int);
     check_type!(~"foo": ~str);
-    check_type!(@"bar": @str);
     check_type!(~[20, 22]: ~[int]);
     check_type!(@[]: @[int]);
     check_type!(@[24, 26]: @[int]);
index 228b91a4532cd939353cce92fd39632f43eebf84..5117d0849fb97b9d2a944ef33089df71b63c7551 100644 (file)
@@ -41,7 +41,6 @@ pub fn main() {
     check_type!(~int);
     check_type!(@int);
     check_type!(~str);
-    check_type!(@str);
     check_type!(~[int]);
     check_type!(@[int]);
     check_type!(extern fn());
index 6dec5fdaa1cbac0a7a498c600aadc4167042e292..38000a43518b4c4bb5e1478846f3133c2945415c 100644 (file)
@@ -180,9 +180,6 @@ fn visit_char(&mut self) -> bool {
     }
 
     fn visit_estr_box(&mut self) -> bool {
-        self.align_to::<@str>();
-        if ! self.inner().visit_estr_box() { return false; }
-        self.bump_past::<@str>();
         true
     }
 
index 1e3bd5897a9d50776be3dbb2ce7e459198a2a84a..dc7e51c3c2364cb5c60c79933c4b93e71451df7e 100644 (file)
@@ -63,11 +63,6 @@ pub fn main() {
     assert_eq!(map.find_equiv(&(~"cde")), Some(&c));
     assert_eq!(map.find_equiv(&(~"def")), Some(&d));
 
-    assert_eq!(map.find_equiv(&(@"abc")), Some(&a));
-    assert_eq!(map.find_equiv(&(@"bcd")), Some(&b));
-    assert_eq!(map.find_equiv(&(@"cde")), Some(&c));
-    assert_eq!(map.find_equiv(&(@"def")), Some(&d));
-
     assert_eq!(map.find_equiv(&SendStrStatic("abc")), Some(&a));
     assert_eq!(map.find_equiv(&SendStrStatic("bcd")), Some(&b));
     assert_eq!(map.find_equiv(&SendStrStatic("cde")), Some(&c));