Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upTracking issue for `[T]::rsplit` and `[T]::rsplit_mut` #41020
Comments
This comment has been minimized.
This comment has been minimized.
|
I don't think this improvement needs an RFC. It seems like Rsplit needs to use a distinct iterator type for encapsulation so that it can be distinct when subslice splitting finally comes around? |
This comment has been minimized.
This comment has been minimized.
|
OK, no RFC. Working on a patch. @bluss Is a feature flag needed for this? |
This comment has been minimized.
This comment has been minimized.
|
Yes, the usual way is that you invent a new feature name for it and introduce as unstable. |
This comment has been minimized.
This comment has been minimized.
|
OK, thanks. I don't need to add it to |
jorendorff
added a commit
to jorendorff/rust
that referenced
this issue
Apr 4, 2017
jorendorff
added a commit
to jorendorff/rust
that referenced
this issue
Apr 4, 2017
This comment has been minimized.
This comment has been minimized.
|
Correct, that's for language (this is library) feature gates. |
jorendorff
added a commit
to jorendorff/rust
that referenced
this issue
Apr 4, 2017
jorendorff
added a commit
to jorendorff/rust
that referenced
this issue
Apr 4, 2017
This comment has been minimized.
This comment has been minimized.
|
PR #41065. |
arielb1
pushed a commit
to arielb1/rust
that referenced
this issue
Apr 5, 2017
GuillaumeGomez
closed this
May 5, 2017
SimonSapin
changed the title
Add methods `[T]::rsplit` and `[T]::rsplit_mut`
Tracking issue for `[T]::rsplit` and `[T]::rsplit_mut`
Mar 17, 2018
This comment has been minimized.
This comment has been minimized.
|
This should not have been closed since it is the tracking issue for unstable APIs. |
SimonSapin
reopened this
Mar 17, 2018
This comment has been minimized.
This comment has been minimized.
|
By itself this API seems unnecessary to me as it is the same as This has been in nightly for 11 months without issue: @rfcbot fcp merge |
SimonSapin
added
T-libs
B-unstable
C-tracking-issue
labels
Mar 17, 2018
This comment has been minimized.
This comment has been minimized.
|
With proper labels… @rfcbot fcp merge |
rfcbot
added
the
proposed-final-comment-period
label
Mar 17, 2018
This comment has been minimized.
This comment has been minimized.
rfcbot
commented
Mar 17, 2018
•
|
Team member @SimonSapin has proposed to merge this. The next step is review by the rest of the tagged teams: No concerns currently listed. Once a majority of reviewers approve (and none object), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
rfcbot
added
final-comment-period
and removed
proposed-final-comment-period
labels
Mar 19, 2018
This comment has been minimized.
This comment has been minimized.
rfcbot
commented
Mar 19, 2018
|
|
This comment has been minimized.
This comment has been minimized.
rfcbot
commented
Mar 29, 2018
|
The final comment period is now complete. |
jorendorff commentedApr 2, 2017
•
edited by SimonSapin
Update (@SimonSapin): this is now a tracking issue for methods implemented in #41065.
In @brson's tech review of Programming Rust, when he got to the bit where we list all the slice methods, he wrote: "What about 'rsplit' (no 'n')?"
I thought, oh no, I missed a method. But there really isn't a
[T]::rsplitmethod!Slices don't have
.rsplit(p), I guess maybe because.split(p).rev()does exactly what.rsplit(p)would do. (The two are subtly different for strings, in cases where the pattern can have overlapping matches.)But is that a good enough reason to "break symmetry"?
@brson either really expected
rsplitto exist, or he was speaking up for a hypothetical reader, new to Rust, who might expect it. Either way, I think it should be added, just to reduce by 1 the number of curious wrinkles in libcore. I'll write an RFC if this seems reasonable.