Skip to content

Commit cf26754

Browse files
committed
Review comments
1 parent b2cf9a0 commit cf26754

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

src/libcore/convert.rs

+16-2
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@
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")]
577577
impl 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")]
598598
impl 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")]
601615
impl From<!> for Infallible {
602616
fn from(x: !) -> Self {

0 commit comments

Comments
 (0)