@@ -39,7 +39,6 @@ use util::nodemap::{NodeSet, DefIdMap, FxHashMap, FxHashSet};
39
39
use serialize:: { self , Encodable , Encoder } ;
40
40
use std:: cell:: RefCell ;
41
41
use std:: cmp;
42
- use std:: cmp:: Ordering ;
43
42
use std:: fmt;
44
43
use std:: hash:: { Hash , Hasher } ;
45
44
use std:: iter:: FromIterator ;
@@ -498,20 +497,6 @@ impl<'tcx> Hash for TyS<'tcx> {
498
497
}
499
498
}
500
499
501
- impl < ' tcx > Ord for TyS < ' tcx > {
502
- #[ inline]
503
- fn cmp ( & self , other : & TyS < ' tcx > ) -> Ordering {
504
- // (self as *const _).cmp(other as *const _)
505
- ( self as * const TyS < ' tcx > ) . cmp ( & ( other as * const TyS < ' tcx > ) )
506
- }
507
- }
508
- impl < ' tcx > PartialOrd for TyS < ' tcx > {
509
- #[ inline]
510
- fn partial_cmp ( & self , other : & TyS < ' tcx > ) -> Option < Ordering > {
511
- Some ( self . cmp ( other) )
512
- }
513
- }
514
-
515
500
impl < ' tcx > TyS < ' tcx > {
516
501
pub fn is_primitive_ty ( & self ) -> bool {
517
502
match self . sty {
@@ -581,19 +566,6 @@ impl<T> PartialEq for Slice<T> {
581
566
}
582
567
impl < T > Eq for Slice < T > { }
583
568
584
- impl < T > Ord for Slice < T > {
585
- #[ inline]
586
- fn cmp ( & self , other : & Slice < T > ) -> Ordering {
587
- ( & self . 0 as * const [ T ] ) . cmp ( & ( & other. 0 as * const [ T ] ) )
588
- }
589
- }
590
- impl < T > PartialOrd for Slice < T > {
591
- #[ inline]
592
- fn partial_cmp ( & self , other : & Slice < T > ) -> Option < Ordering > {
593
- Some ( self . cmp ( other) )
594
- }
595
- }
596
-
597
569
impl < T > Hash for Slice < T > {
598
570
fn hash < H : Hasher > ( & self , s : & mut H ) {
599
571
( self . as_ptr ( ) , self . len ( ) ) . hash ( s)
@@ -1128,7 +1100,7 @@ pub type PolySubtypePredicate<'tcx> = ty::Binder<SubtypePredicate<'tcx>>;
1128
1100
/// equality between arbitrary types. Processing an instance of
1129
1101
/// Form #2 eventually yields one of these `ProjectionPredicate`
1130
1102
/// instances to normalize the LHS.
1131
- #[ derive( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash , RustcEncodable , RustcDecodable ) ]
1103
+ #[ derive( Copy , Clone , PartialEq , Eq , Hash , RustcEncodable , RustcDecodable ) ]
1132
1104
pub struct ProjectionPredicate < ' tcx > {
1133
1105
pub projection_ty : ProjectionTy < ' tcx > ,
1134
1106
pub ty : Ty < ' tcx > ,
0 commit comments