diff --git a/library/core/src/cmp.rs b/library/core/src/cmp.rs index f281e8429c693..81aed8afd5b51 100644 --- a/library/core/src/cmp.rs +++ b/library/core/src/cmp.rs @@ -1349,7 +1349,7 @@ mod impls { impl PartialOrd for $t { #[inline] fn partial_cmp(&self, other: &$t) -> Option { - match (self <= other, self >= other) { + match (*self <= *other, *self >= *other) { (false, false) => None, (false, true) => Some(Greater), (true, false) => Some(Less),