@@ -193,6 +193,7 @@ pub fn max<T: TotalOrd>(v1: T, v2: T) -> T {
193193#[ cfg( not( test) ) ]
194194mod impls {
195195 use cmp:: { Ord , TotalOrd , Eq , TotalEq , Ordering } ;
196+ use owned:: Box ;
196197
197198 // & pointers
198199 impl < ' a , T : Eq > Eq for & ' a T {
@@ -240,28 +241,28 @@ mod impls {
240241 }
241242 impl < T : TotalEq > TotalEq for @T { }
242243
243- // ~ pointers
244- impl < T : Eq > Eq for ~ T {
244+ // box pointers
245+ impl < T : Eq > Eq for Box < T > {
245246 #[ inline]
246- fn eq ( & self , other : & ~ T ) -> bool { * ( * self ) == * ( * other) }
247+ fn eq ( & self , other : & Box < T > ) -> bool { * ( * self ) == * ( * other) }
247248 #[ inline]
248- fn ne ( & self , other : & ~ T ) -> bool { * ( * self ) != * ( * other) }
249+ fn ne ( & self , other : & Box < T > ) -> bool { * ( * self ) != * ( * other) }
249250 }
250- impl < T : Ord > Ord for ~ T {
251+ impl < T : Ord > Ord for Box < T > {
251252 #[ inline]
252- fn lt ( & self , other : & ~ T ) -> bool { * ( * self ) < * ( * other) }
253+ fn lt ( & self , other : & Box < T > ) -> bool { * ( * self ) < * ( * other) }
253254 #[ inline]
254- fn le ( & self , other : & ~ T ) -> bool { * ( * self ) <= * ( * other) }
255+ fn le ( & self , other : & Box < T > ) -> bool { * ( * self ) <= * ( * other) }
255256 #[ inline]
256- fn ge ( & self , other : & ~ T ) -> bool { * ( * self ) >= * ( * other) }
257+ fn ge ( & self , other : & Box < T > ) -> bool { * ( * self ) >= * ( * other) }
257258 #[ inline]
258- fn gt ( & self , other : & ~ T ) -> bool { * ( * self ) > * ( * other) }
259+ fn gt ( & self , other : & Box < T > ) -> bool { * ( * self ) > * ( * other) }
259260 }
260- impl < T : TotalOrd > TotalOrd for ~ T {
261+ impl < T : TotalOrd > TotalOrd for Box < T > {
261262 #[ inline]
262- fn cmp ( & self , other : & ~ T ) -> Ordering { ( * * self ) . cmp ( * other) }
263+ fn cmp ( & self , other : & Box < T > ) -> Ordering { ( * * self ) . cmp ( * other) }
263264 }
264- impl < T : TotalEq > TotalEq for ~ T { }
265+ impl < T : TotalEq > TotalEq for Box < T > { }
265266}
266267
267268#[ cfg( test) ]
0 commit comments