Skip to content

Commit

Permalink
Unrolled build for rust-lang#122072
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#122072 - KonradHoeffner:patch-1, r=cuviper

Refer to "slice" instead of "vector" in Ord and PartialOrd trait impl of slices

The trait implementation comments of Ord and PartialOrd for slice incorrectly mention "vectors" instead of "slices".
This PR fixes those two comments as requested in rust-lang#122071.
  • Loading branch information
rust-timer authored Mar 7, 2024
2 parents 7d3702e + 6223e4c commit 98078d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/core/src/slice/cmp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ where
#[stable(feature = "rust1", since = "1.0.0")]
impl<T: Eq> Eq for [T] {}

/// Implements comparison of vectors [lexicographically](Ord#lexicographical-comparison).
/// Implements comparison of slices [lexicographically](Ord#lexicographical-comparison).
#[stable(feature = "rust1", since = "1.0.0")]
impl<T: Ord> Ord for [T] {
fn cmp(&self, other: &[T]) -> Ordering {
SliceOrd::compare(self, other)
}
}

/// Implements comparison of vectors [lexicographically](Ord#lexicographical-comparison).
/// Implements comparison of slices [lexicographically](Ord#lexicographical-comparison).
#[stable(feature = "rust1", since = "1.0.0")]
impl<T: PartialOrd> PartialOrd for [T] {
fn partial_cmp(&self, other: &[T]) -> Option<Ordering> {
Expand Down

0 comments on commit 98078d6

Please sign in to comment.