about summary refs log tree commit diff
diff options
context:
space:
mode:
authorArthur Carcano <arthur.carcano@ocamlpro.com>2024-09-17 20:03:59 +0200
committerArthur Carcano <arthur.carcano@ocamlpro.com>2024-09-17 21:16:12 +0200
commit0c9a17689ad8d72610bedcb17dac42ac6822d171 (patch)
tree986fbd8d7362c097932f0209f733e1d1a94928d5
parente9e13a68d7271baac458addc056ffff6ddbbe57c (diff)
downloadrust-0c9a17689ad8d72610bedcb17dac42ac6822d171.tar.gz
rust-0c9a17689ad8d72610bedcb17dac42ac6822d171.zip
Remove uneeded PartialOrd bound in cmp::Ord::clamp
There is a Self: PartialOrd bound in Ord::clamp, but it is already
required by the trait itself. Likely a left-over from the const trait
deletion in 76dbe2910465072f85e74d6f7115ec9e6803e8bf.

Reported-by: @noeensarguet
-rw-r--r--library/core/src/cmp.rs1
1 files changed, 0 insertions, 1 deletions
diff --git a/library/core/src/cmp.rs b/library/core/src/cmp.rs
index a1ed993b7d9..818a36002e7 100644
--- a/library/core/src/cmp.rs
+++ b/library/core/src/cmp.rs
@@ -901,7 +901,6 @@ pub trait Ord: Eq + PartialOrd<Self> {
     fn clamp(self, min: Self, max: Self) -> Self
     where
         Self: Sized,
-        Self: PartialOrd,
     {
         assert!(min <= max);
         if self < min {