-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Tracking issue for RFC 2351, "Add is_sorted to the standard library" #53485
Copy link
Copy link
Closed
Labels
A-iteratorsArea: IteratorsArea: IteratorsA-sliceArea: `[T]`Area: `[T]`B-RFC-approvedBlocker: Approved by a merged RFC but not yet implemented.Blocker: Approved by a merged RFC but not yet implemented.B-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCLibs-SmallLibs issues that are considered "small" or self-containedLibs issues that are considered "small" or self-containedLibs-TrackedLibs issues that are tracked on the team's project board.Libs issues that are tracked on the team's project board.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.The final comment period is finished for this PR / Issue.
Metadata
Metadata
Assignees
Labels
A-iteratorsArea: IteratorsArea: IteratorsA-sliceArea: `[T]`Area: `[T]`B-RFC-approvedBlocker: Approved by a merged RFC but not yet implemented.Blocker: Approved by a merged RFC but not yet implemented.B-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCLibs-SmallLibs issues that are considered "small" or self-containedLibs issues that are considered "small" or self-containedLibs-TrackedLibs issues that are tracked on the team's project board.Libs issues that are tracked on the team's project board.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.The final comment period is finished for this PR / Issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Feature gate:
#![feature(is_sorted)]This is a tracking issue for
is_sorted{_by,_by_key}functions on[T]andIterator(rust-lang/rfcs#2351).Public API
Steps / History
is_sortedtoIteratorand[T]#55045[T]::is_sorted_by{,_key}#102977Unresolved Questions
Ordinstead of onlyPartialOrd?is_sorted[_by_key]requireOrdinstead ofPartialOrdand removeIterator::is_sorted_by_key#81382 (comment) (no,PartialOrdis the right bound)Iterator::is_sorted_by_keybe added as well?std::cmp::is_sortedinstead?is_sorted_bytake a closure returningboolinstead ofOption<Ordering>?boolinstead ofPartiolOrdas return value of the comparison closure in{slice,Iteraotr}::is_sorted_by#118811Footnotes
https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html ↩