Rollup merge of #122074 - KonradHoeffner:patch-2, r=jhpratt

Add missing PartialOrd trait implementation doc for array

Analogously to vectors and slices, this PR documents the lexicographic sorting of PartialOrd as rustdoc comment on the trait implementation of PartialOrd for arrays.
Associated issue: #122073.
This commit is contained in:
Matthias Krüger 2024-03-06 22:41:56 +01:00 committed by GitHub
commit 6279ef2b4e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -360,6 +360,7 @@ fn index_mut(&mut self, index: I) -> &mut Self::Output {
} }
} }
/// Implements comparison of arrays [lexicographically](Ord#lexicographical-comparison).
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
impl<T: PartialOrd, const N: usize> PartialOrd for [T; N] { impl<T: PartialOrd, const N: usize> PartialOrd for [T; N] {
#[inline] #[inline]