about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-02-27 20:39:39 -0800
committerbors <bors@rust-lang.org>2013-02-27 20:39:39 -0800
commit6bff18ea0de2f96a4103c11bc183b380f6d2c83a (patch)
tree5a95577d5991f0bbfa0dff98c8e446679030c3f5
parent292e946163c5acbca6b90f64133921752b0ed963 (diff)
parenta712d828f93ca08c072808d57fb110b1f9d0ca72 (diff)
downloadrust-6bff18ea0de2f96a4103c11bc183b380f6d2c83a.tar.gz
rust-6bff18ea0de2f96a4103c11bc183b380f6d2c83a.zip
auto merge of #5098 : pkgw/rust/pr/issue4869, r=brson
See issue #4869. I'm not quite sure what constitutes "consensus from the core team" (cf. discussion in the issue), but this at least demonstrates that the proposed change is pretty straightforward.

After this change, there are no new test failures. I've un-ignored the `to_str` vectors test; it's not at all obvious to me why it'd be problematic, and it passes on my Linux machine.
-rw-r--r--src/libcore/to_str.rs26
1 files changed, 5 insertions, 21 deletions
diff --git a/src/libcore/to_str.rs b/src/libcore/to_str.rs
index 17e4e042a5a..916c188a9c3 100644
--- a/src/libcore/to_str.rs
+++ b/src/libcore/to_str.rs
@@ -1,4 +1,4 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -137,15 +137,6 @@ impl<A:ToStr> ToStr for @[A] {
     }
 }
 
-impl<A:ToStr> ToStr for @A {
-    #[inline(always)]
-    pure fn to_str(&self) -> ~str { ~"@" + (**self).to_str() }
-}
-impl<A:ToStr> ToStr for ~A {
-    #[inline(always)]
-    pure fn to_str(&self) -> ~str { ~"~" + (**self).to_str() }
-}
-
 #[cfg(test)]
 #[allow(non_implicitly_copyable_typarams)]
 mod tests {
@@ -170,19 +161,12 @@ mod tests {
     }
 
     #[test]
-    #[ignore]
     fn test_vectors() {
         let x: ~[int] = ~[];
-        assert x.to_str() == ~"~[]";
-        assert (~[1]).to_str() == ~"~[1]";
-        assert (~[1, 2, 3]).to_str() == ~"~[1, 2, 3]";
+        assert x.to_str() == ~"[]";
+        assert (~[1]).to_str() == ~"[1]";
+        assert (~[1, 2, 3]).to_str() == ~"[1, 2, 3]";
         assert (~[~[], ~[1], ~[1, 1]]).to_str() ==
-               ~"~[~[], ~[1], ~[1, 1]]";
-    }
-
-    #[test]
-    fn test_pointer_types() {
-        assert (@1).to_str() == ~"@1";
-        assert (~(true, false)).to_str() == ~"~(true, false)";
+               ~"[[], [1], [1, 1]]";
     }
 }