@@ -65,50 +65,12 @@ impl<T: Clone> Clone for Box<T> {
6565 }
6666}
6767
68- // NOTE(stage0): remove impl after a snapshot
69- #[ cfg( stage0) ]
70- impl < T : PartialEq > PartialEq for Box < T > {
71- #[ inline]
72- fn eq ( & self , other : & Box < T > ) -> bool { * ( * self ) == * ( * other) }
73- #[ inline]
74- fn ne ( & self , other : & Box < T > ) -> bool { * ( * self ) != * ( * other) }
75- }
76- // NOTE(stage0): remove impl after a snapshot
77- #[ cfg( stage0) ]
78- impl < T : PartialOrd > PartialOrd for Box < T > {
79- #[ inline]
80- fn partial_cmp ( & self , other : & Box < T > ) -> Option < Ordering > {
81- ( * * self ) . partial_cmp ( & * * other)
82- }
83- #[ inline]
84- fn lt ( & self , other : & Box < T > ) -> bool { * ( * self ) < * ( * other) }
85- #[ inline]
86- fn le ( & self , other : & Box < T > ) -> bool { * ( * self ) <= * ( * other) }
87- #[ inline]
88- fn ge ( & self , other : & Box < T > ) -> bool { * ( * self ) >= * ( * other) }
89- #[ inline]
90- fn gt ( & self , other : & Box < T > ) -> bool { * ( * self ) > * ( * other) }
91- }
92- // NOTE(stage0): remove impl after a snapshot
93- #[ cfg( stage0) ]
94- impl < T : Ord > Ord for Box < T > {
95- #[ inline]
96- fn cmp ( & self , other : & Box < T > ) -> Ordering {
97- ( * * self ) . cmp ( & * * other)
98- }
99- }
100- // NOTE(stage0): remove impl after a snapshot
101- #[ cfg( stage0) ]
102- impl < T : Eq > Eq for Box < T > { }
103-
104- #[ cfg( not( stage0) ) ] // NOTE(stage0): remove cfg after a snapshot
10568impl < Sized ? T : PartialEq > PartialEq for Box < T > {
10669 #[ inline]
10770 fn eq ( & self , other : & Box < T > ) -> bool { PartialEq :: eq ( & * * self , & * * other) }
10871 #[ inline]
10972 fn ne ( & self , other : & Box < T > ) -> bool { PartialEq :: ne ( & * * self , & * * other) }
11073}
111- #[ cfg( not( stage0) ) ] // NOTE(stage0): remove cfg after a snapshot
11274impl < Sized ? T : PartialOrd > PartialOrd for Box < T > {
11375 #[ inline]
11476 fn partial_cmp ( & self , other : & Box < T > ) -> Option < Ordering > {
@@ -123,14 +85,12 @@ impl<Sized? T: PartialOrd> PartialOrd for Box<T> {
12385 #[ inline]
12486 fn gt ( & self , other : & Box < T > ) -> bool { PartialOrd :: gt ( & * * self , & * * other) }
12587}
126- #[ cfg( not( stage0) ) ] // NOTE(stage0): remove cfg after a snapshot
12788impl < Sized ? T : Ord > Ord for Box < T > {
12889 #[ inline]
12990 fn cmp ( & self , other : & Box < T > ) -> Ordering {
13091 Ord :: cmp ( & * * self , & * * other)
13192 }
13293}
133- #[ cfg( not( stage0) ) ] // NOTE(stage0): remove cfg after a snapshot
13494impl < Sized ? T : Eq > Eq for Box < T > { }
13595
13696/// Extension methods for an owning `Any` trait object.
0 commit comments