@@ -193,6 +193,7 @@ pub fn max<T: TotalOrd>(v1: T, v2: T) -> T {
193
193
#[ cfg( not( test) ) ]
194
194
mod impls {
195
195
use cmp:: { Ord , TotalOrd , Eq , TotalEq , Ordering } ;
196
+ use owned:: Box ;
196
197
197
198
// & pointers
198
199
impl < ' a , T : Eq > Eq for & ' a T {
@@ -240,28 +241,28 @@ mod impls {
240
241
}
241
242
impl < T : TotalEq > TotalEq for @T { }
242
243
243
- // ~ pointers
244
- impl < T : Eq > Eq for ~ T {
244
+ // box pointers
245
+ impl < T : Eq > Eq for Box < T > {
245
246
#[ inline]
246
- fn eq ( & self , other : & ~ T ) -> bool { * ( * self ) == * ( * other) }
247
+ fn eq ( & self , other : & Box < T > ) -> bool { * ( * self ) == * ( * other) }
247
248
#[ inline]
248
- fn ne ( & self , other : & ~ T ) -> bool { * ( * self ) != * ( * other) }
249
+ fn ne ( & self , other : & Box < T > ) -> bool { * ( * self ) != * ( * other) }
249
250
}
250
- impl < T : Ord > Ord for ~ T {
251
+ impl < T : Ord > Ord for Box < T > {
251
252
#[ inline]
252
- fn lt ( & self , other : & ~ T ) -> bool { * ( * self ) < * ( * other) }
253
+ fn lt ( & self , other : & Box < T > ) -> bool { * ( * self ) < * ( * other) }
253
254
#[ inline]
254
- fn le ( & self , other : & ~ T ) -> bool { * ( * self ) <= * ( * other) }
255
+ fn le ( & self , other : & Box < T > ) -> bool { * ( * self ) <= * ( * other) }
255
256
#[ inline]
256
- fn ge ( & self , other : & ~ T ) -> bool { * ( * self ) >= * ( * other) }
257
+ fn ge ( & self , other : & Box < T > ) -> bool { * ( * self ) >= * ( * other) }
257
258
#[ inline]
258
- fn gt ( & self , other : & ~ T ) -> bool { * ( * self ) > * ( * other) }
259
+ fn gt ( & self , other : & Box < T > ) -> bool { * ( * self ) > * ( * other) }
259
260
}
260
- impl < T : TotalOrd > TotalOrd for ~ T {
261
+ impl < T : TotalOrd > TotalOrd for Box < T > {
261
262
#[ inline]
262
- fn cmp ( & self , other : & ~ T ) -> Ordering { ( * * self ) . cmp ( * other) }
263
+ fn cmp ( & self , other : & Box < T > ) -> Ordering { ( * * self ) . cmp ( * other) }
263
264
}
264
- impl < T : TotalEq > TotalEq for ~ T { }
265
+ impl < T : TotalEq > TotalEq for Box < T > { }
265
266
}
266
267
267
268
#[ cfg( test) ]
0 commit comments