@@ -40,17 +40,6 @@ impl ToStr for () {
40
40
fn to_str ( & self ) -> ~str { ~"( ) " }
41
41
}
42
42
43
- impl < A : ToStr > ToStr for ( A , ) {
44
- #[ inline]
45
- fn to_str ( & self ) -> ~str {
46
- match * self {
47
- ( ref a, ) => {
48
- format ! ( "({},)" , ( * a) . to_str( ) )
49
- }
50
- }
51
- }
52
- }
53
-
54
43
impl < A : ToStr +Hash +Eq , B : ToStr > ToStr for HashMap < A , B > {
55
44
#[ inline]
56
45
fn to_str ( & self ) -> ~str {
@@ -91,36 +80,6 @@ impl<A:ToStr+Hash+Eq> ToStr for HashSet<A> {
91
80
}
92
81
}
93
82
94
- impl<A:ToStr,B:ToStr> ToStr for (A, B) {
95
- #[inline]
96
- fn to_str(&self) -> ~str {
97
- // FIXME(#4653): this causes an llvm assertion
98
- //let &(ref a, ref b) = self;
99
- match *self {
100
- (ref a, ref b) => {
101
- format!(" ( { } , { } ) ", ( * a) . to_str ( ) , ( * b) . to_str ( ) )
102
- }
103
- }
104
- }
105
- }
106
-
107
- impl < A : ToStr , B : ToStr , C : ToStr > ToStr for ( A , B , C ) {
108
- #[ inline]
109
- fn to_str ( & self ) -> ~str {
110
- // FIXME(#4653): this causes an llvm assertion
111
- //let &(ref a, ref b, ref c) = self;
112
- match * self {
113
- ( ref a, ref b, ref c) => {
114
- format ! ( "({}, {}, {})" ,
115
- ( * a) . to_str( ) ,
116
- ( * b) . to_str( ) ,
117
- ( * c) . to_str( )
118
- )
119
- }
120
- }
121
- }
122
- }
123
-
124
83
impl<'a,A:ToStr> ToStr for &'a [A] {
125
84
#[inline]
126
85
fn to_str(&self) -> ~str {
@@ -178,13 +137,6 @@ mod tests {
178
137
assert_eq!((~" hi").to_str(), ~" hi");
179
138
}
180
139
181
- #[test]
182
- fn test_tuple_types() {
183
- assert_eq!((1, 2).to_str(), ~" ( 1 , 2 ) ");
184
- assert_eq!((~" a", ~" b", false).to_str(), ~" ( a, b, false ) ");
185
- assert_eq!(((), ((), 100)).to_str(), ~" ( ( ) , ( ( ) , 100 ) ) ");
186
- }
187
-
188
140
#[test]
189
141
fn test_vectors() {
190
142
let x: ~[int] = ~[];
0 commit comments