Implement split_pattern on slices#131340
Implement split_pattern on slices#131340eduardorittner wants to merge 7 commits intorust-lang:mainfrom
Conversation
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Amanieu (or someone else) some time within the next two weeks. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
| /// Allows splitting a slice by another slice | ||
| (unstable, split_pattern, "CURRENT_RUSTC_VERSION", Some(49036)), |
There was a problem hiding this comment.
| /// Allows splitting a slice by another slice | |
| (unstable, split_pattern, "CURRENT_RUSTC_VERSION", Some(49036)), |
Library features shouldn't (and don't need to) be declared inside the compiler.
compiler/rustc_span/src/symbol.rs
Outdated
| soft, | ||
| specialization, | ||
| speed, | ||
| split_pattern, |
There was a problem hiding this comment.
| split_pattern, |
(see above)
There was a problem hiding this comment.
This UI test should be removed. It's only required to exist right now by tidy because you declared a library feature as a compiler feature, too. The doctest should be sufficient.
There was a problem hiding this comment.
Done! I was following the rustc-dev-guide and thought that all unstable features should be declared in the compiler, thanks for clarifying!
|
This should get proposed via an ACP, which is one of the issue templates at https://github.com/rust-lang/libs-team/issues. That gives the libs-api team a chance to figure out if the new API makes sense before you put too much effort into the implementation.
As fmease mentioned, library features don't really need to touch anything outside of |
Since it's a library feature it shouldn't be declared inside the compiler
|
Thank you so much for your help I issued an APC at rust-lang/libs-team#457 and will be going from there |
|
☔ The latest upstream changes (presumably #143289) made this pull request unmergeable. Please resolve the merge conflicts. |
From #49036, adds a
split_patternmethod on slices which takes a second slice and splits using that one.I was unsure about where to add additional tests, specifically to test reverse iteration using the
next_backmethod, my guess would be in library/core/tests/slice.rs, however when looking at the tests I saw no test for unstable features, so I was unsure if I should add them somewhere else.ACP: rust-lang/libs-team#457