Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify behavior of slice prefix/suffix operations in case of equality #121634

Merged
merged 1 commit into from Mar 2, 2024

Conversation

RavuAlHemio
Copy link
Contributor

Operations such as starts_with, ends_with, strip_prefix and strip_suffix can be either strict (do not consider a slice to be a prefix/suffix of itself) or not. In Rust's case, they are not strict. Add a few phrases to the documentation to clarify this.

Operations such as starts_with, ends_with, strip_prefix and strip_suffix
can be either strict (do not consider a slice to be a prefix/suffix of
itself) or not. In Rust's case, they are not strict. Add a few phrases to
the documentation to clarify this.
@rustbot
Copy link
Collaborator

rustbot commented Feb 26, 2024

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @cuviper (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 (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Feb 26, 2024
@cuviper
Copy link
Member

cuviper commented Mar 1, 2024

LGTM!

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Mar 1, 2024

📌 Commit c9a4a4a has been approved by cuviper

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 1, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 2, 2024
…iaskrgr

Rollup of 11 pull requests

Successful merges:

 - rust-lang#111505 (Made `INVALID_DOC_ATTRIBUTES` lint deny by default)
 - rust-lang#120305 (Delete line if suggestion would replace it with an empty line)
 - rust-lang#121153 (Suggest removing superfluous semicolon when statements used as expression)
 - rust-lang#121497 (`-Znext-solver=coherence`: suggest increasing recursion limit)
 - rust-lang#121634 (Clarify behavior of slice prefix/suffix operations in case of equality)
 - rust-lang#121706 (match lowering: Remove hacky branch in sort_candidate)
 - rust-lang#121730 (Add profiling support to AIX)
 - rust-lang#121750 (match lowering: Separate the `bool` case from other integers in `TestKind`)
 - rust-lang#121803 (Never say "`Trait` is implemented for `{type error}`")
 - rust-lang#121811 (Move sanitizer ui tests to sanitizer directory)
 - rust-lang#121824 (Implement missing ABI structures in StableMIR)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 441217d into rust-lang:master Mar 2, 2024
11 checks passed
@rustbot rustbot added this to the 1.78.0 milestone Mar 2, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 2, 2024
Rollup merge of rust-lang#121634 - RavuAlHemio:slice-prefix-suffix-docs, r=cuviper

Clarify behavior of slice prefix/suffix operations in case of equality

Operations such as starts_with, ends_with, strip_prefix and strip_suffix can be either strict (do not consider a slice to be a prefix/suffix of itself) or not. In Rust's case, they are not strict. Add a few phrases to the documentation to clarify this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants