Skip to content

Conversation

WaffleLapkin
Copy link
Member

replace_first is a sensible name for a function, analogous to actually existing <[_]>::split_first, for example. (I just saw someone try to search for it)

I think it's reasonable to add such an alias for replacen, which replaces the first occurrence of passed a 1.

@rustbot
Copy link
Collaborator

rustbot commented May 21, 2025

r? @jhpratt

rustbot has assigned @jhpratt.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@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 May 21, 2025
@WaffleLapkin
Copy link
Member Author

@bors rollup

@jhpratt
Copy link
Member

jhpratt commented May 22, 2025

@bors r+

@bors
Copy link
Collaborator

bors commented May 22, 2025

📌 Commit cff790c has been approved by jhpratt

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 May 22, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request May 22, 2025
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#140431 (dont handle bool transmute)
 - rust-lang#140868 (rustdoc: Fix links with inline code in trait impl docs)
 - rust-lang#141323 (Add bors environment to CI)
 - rust-lang#141337 (bump stdarch)
 - rust-lang#141364 (rustdoc-json: Remove false docs and add test for inline attribute)
 - rust-lang#141370 (add doc alias `replace_first` for `str::replacen`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit a31a398 into rust-lang:master May 22, 2025
6 checks passed
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request May 22, 2025
Rollup merge of rust-lang#141370 - WaffleLapkin:hiiii, r=jhpratt

add doc alias `replace_first` for `str::replacen`

`replace_first` is a sensible name for a function, analogous to actually existing `<[_]>::split_first`, for example. (I just saw someone try to search for it)

I think it's reasonable to add such an alias for `replacen`, which replaces the first occurrence of passed a 1.
@rustbot rustbot added this to the 1.89.0 milestone May 22, 2025
@WaffleLapkin WaffleLapkin deleted the hiiii branch May 22, 2025 08:40
github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this pull request May 26, 2025
add doc alias `replace_first` for `str::replacen`

`replace_first` is a sensible name for a function, analogous to actually existing `<[_]>::split_first`, for example. (I just saw someone try to search for it)

I think it's reasonable to add such an alias for `replacen`, which replaces the first occurrence of passed a 1.
github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this pull request May 26, 2025
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#140431 (dont handle bool transmute)
 - rust-lang#140868 (rustdoc: Fix links with inline code in trait impl docs)
 - rust-lang#141323 (Add bors environment to CI)
 - rust-lang#141337 (bump stdarch)
 - rust-lang#141364 (rustdoc-json: Remove false docs and add test for inline attribute)
 - rust-lang#141370 (add doc alias `replace_first` for `str::replacen`)

r? `@ghost`
`@rustbot` modify labels: rollup
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.

4 participants