-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-sliceArea: `[T]`Area: `[T]`A-strArea: str and StringArea: str and StringC-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-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.
Description
This is a tracking issue for the RFC "Needle API (née Pattern API)" (rust-lang/rfcs#2500).
Feature gates:
-
#![feature(needle)]
(the traits and method incore::needle
itself, and impl of these traits) -
#![feature(str_find_range)]
(find_range
,rfind_range
,match_ranges
andrmatch_ranges
methods forstr
) -
#![feature(mut_str_needle_methods)]
(split_mut
,matches_mut
,trim_mut
etc forstr
) -
#![feature(slice_needle_methods)]
(find
,matches
,trim_matches
,replace
,split
etc for[T]
) -
#![feature(os_str_needle_methods)]
(find
,matches
etc forOsStr
)
Steps:
- Implement the RFC (cc @rust-lang/libs @kennytm @bluss -- can anyone write up mentoring instructions?)
- Stabilization PR (see instructions on forge)
-
Currently, due to Implied bounds rfcs#2089 and/or RFC: Associated type bounds of form
MyTrait<AssociatedType: Bounds>
rfcs#2289 not being implemented, using aHaystack
in any algorithm would need to a redundantwhere
clause. -
Naive vs. fast algorithm for
T: !Ord
-
Should we represent
SharedHaystack
using a more general concept of "cheaply cloneable"? -
With a benefit of simplified API, do we want to merge
Consumer
andSearcher
into a single trait? -
Stabilization should require RFC 1672 (disjointness based on associated types).
tesuji, MarkTanashchuk, elichai, tuguzT and Rustacian
Metadata
Metadata
Assignees
Labels
A-sliceArea: `[T]`Area: `[T]`A-strArea: str and StringArea: str and StringC-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-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.