File tree 1 file changed +16
-2
lines changed
1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change 41
41
42
42
#![ stable( feature = "rust1" , since = "1.0.0" ) ]
43
43
44
+ use fmt;
45
+
44
46
/// An identity function.
45
47
///
46
48
/// Two things are important to note about this function:
@@ -571,8 +573,6 @@ impl Clone for Infallible {
571
573
}
572
574
}
573
575
574
- use fmt;
575
-
576
576
#[ stable( feature = "convert_infallible" , since = "1.34.0" ) ]
577
577
impl fmt:: Debug for Infallible {
578
578
fn fmt ( & self , _: & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
@@ -597,6 +597,20 @@ impl PartialEq for Infallible {
597
597
#[ stable( feature = "convert_infallible" , since = "1.34.0" ) ]
598
598
impl Eq for Infallible { }
599
599
600
+ #[ stable( feature = "convert_infallible" , since = "1.34.0" ) ]
601
+ impl PartialOrd for Infallible {
602
+ fn partial_cmp ( & self , _other : & Self ) -> Option < crate :: cmp:: Ordering > {
603
+ match * self { }
604
+ }
605
+ }
606
+
607
+ #[ stable( feature = "convert_infallible" , since = "1.34.0" ) ]
608
+ impl Ord for Infallible {
609
+ fn cmp ( & self , _other : & Self ) -> crate :: cmp:: Ordering {
610
+ match * self { }
611
+ }
612
+ }
613
+
600
614
#[ stable( feature = "convert_infallible" , since = "1.34.0" ) ]
601
615
impl From < !> for Infallible {
602
616
fn from ( x : !) -> Self {
You can’t perform that action at this time.
0 commit comments