File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change 4141
4242#![ stable( feature = "rust1" , since = "1.0.0" ) ]
4343
44+ use fmt;
45+
4446/// An identity function.
4547///
4648/// Two things are important to note about this function:
@@ -571,8 +573,6 @@ impl Clone for Infallible {
571573 }
572574}
573575
574- use fmt;
575-
576576#[ stable( feature = "convert_infallible" , since = "1.34.0" ) ]
577577impl fmt:: Debug for Infallible {
578578 fn fmt ( & self , _: & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
@@ -597,6 +597,20 @@ impl PartialEq for Infallible {
597597#[ stable( feature = "convert_infallible" , since = "1.34.0" ) ]
598598impl Eq for Infallible { }
599599
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+
600614#[ stable( feature = "convert_infallible" , since = "1.34.0" ) ]
601615impl From < !> for Infallible {
602616 fn from ( x : !) -> Self {
You can’t perform that action at this time.
0 commit comments