diff options
| author | Scott McMurray <scottmcm@users.noreply.github.com> | 2025-03-23 20:45:36 -0700 |
|---|---|---|
| committer | Scott McMurray <scottmcm@users.noreply.github.com> | 2025-04-12 22:10:17 -0700 |
| commit | 756670f40ebedd4a6cb1ebf356cb327442888d0a (patch) | |
| tree | 645829fe0c0709d0500f68ab4610b192dcd2f357 /library/core/src/cmp.rs | |
| parent | 19648ce5cd12b11889eccacac50c70ca8ac78fee (diff) | |
| download | rust-756670f40ebedd4a6cb1ebf356cb327442888d0a.tar.gz rust-756670f40ebedd4a6cb1ebf356cb327442888d0a.zip | |
Extend the chaining logic to slices too
Diffstat (limited to 'library/core/src/cmp.rs')
| -rw-r--r-- | library/core/src/cmp.rs | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/library/core/src/cmp.rs b/library/core/src/cmp.rs index 0dc2cc72e06..c315131f413 100644 --- a/library/core/src/cmp.rs +++ b/library/core/src/cmp.rs @@ -2053,6 +2053,22 @@ mod impls { fn ge(&self, other: &&B) -> bool { PartialOrd::ge(*self, *other) } + #[inline] + fn __chaining_lt(&self, other: &&B) -> ControlFlow<bool> { + PartialOrd::__chaining_lt(*self, *other) + } + #[inline] + fn __chaining_le(&self, other: &&B) -> ControlFlow<bool> { + PartialOrd::__chaining_le(*self, *other) + } + #[inline] + fn __chaining_gt(&self, other: &&B) -> ControlFlow<bool> { + PartialOrd::__chaining_gt(*self, *other) + } + #[inline] + fn __chaining_ge(&self, other: &&B) -> ControlFlow<bool> { + PartialOrd::__chaining_ge(*self, *other) + } } #[stable(feature = "rust1", since = "1.0.0")] impl<A: ?Sized> Ord for &A @@ -2108,6 +2124,22 @@ mod impls { fn ge(&self, other: &&mut B) -> bool { PartialOrd::ge(*self, *other) } + #[inline] + fn __chaining_lt(&self, other: &&mut B) -> ControlFlow<bool> { + PartialOrd::__chaining_lt(*self, *other) + } + #[inline] + fn __chaining_le(&self, other: &&mut B) -> ControlFlow<bool> { + PartialOrd::__chaining_le(*self, *other) + } + #[inline] + fn __chaining_gt(&self, other: &&mut B) -> ControlFlow<bool> { + PartialOrd::__chaining_gt(*self, *other) + } + #[inline] + fn __chaining_ge(&self, other: &&mut B) -> ControlFlow<bool> { + PartialOrd::__chaining_ge(*self, *other) + } } #[stable(feature = "rust1", since = "1.0.0")] impl<A: ?Sized> Ord for &mut A |
