about summary refs log tree commit diff
path: root/src/libstd/map.rs
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-11-29 18:37:33 -0800
committerBrian Anderson <banderson@mozilla.com>2012-11-29 22:07:49 -0800
commit3ed9fbd63c6a3c6226bc466786e6d3c1bfec856d (patch)
tree3552c8b37426ce0763648cb056f37f03a7b777ed /src/libstd/map.rs
parent78ee821154ba6034a86397d8540fec00c94e9282 (diff)
downloadrust-3ed9fbd63c6a3c6226bc466786e6d3c1bfec856d.tar.gz
rust-3ed9fbd63c6a3c6226bc466786e6d3c1bfec856d.zip
impls of traits cannot define methods on the anonymous trait
Diffstat (limited to 'src/libstd/map.rs')
-rw-r--r--src/libstd/map.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libstd/map.rs b/src/libstd/map.rs
index d68970679ad..b1909bfb067 100644
--- a/src/libstd/map.rs
+++ b/src/libstd/map.rs
@@ -390,7 +390,7 @@ pub mod chained {
         }
     }
 
-    impl<K:Eq IterBytes Hash Copy ToStr, V: ToStr Copy> T<K, V>: ToStr {
+    impl<K:Eq IterBytes Hash Copy ToStr, V: ToStr Copy> T<K, V> {
         fn to_writer(wr: io::Writer) {
             if self.count == 0u {
                 wr.write_str(~"{}");
@@ -410,7 +410,9 @@ pub mod chained {
             };
             wr.write_str(~" }");
         }
+    }
 
+    impl<K:Eq IterBytes Hash Copy ToStr, V: ToStr Copy> T<K, V>: ToStr {
         pure fn to_str() -> ~str unsafe {
             // Meh -- this should be safe
             do io::with_str_writer |wr| { self.to_writer(wr) }