Skip to content

Conversation

jhpratt
Copy link
Member

@jhpratt jhpratt commented Oct 23, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

WilliamVenner and others added 6 commits October 21, 2025 16:11
Rebased and modified by zachs18.

Co-authored-by: zachs18 <8355914+zachs18@users.noreply.github.com>
…base, r=joshtriplett

Add `String::replace_first` and `String::replace_last`

Rebase of rust-lang#97977 (cc `@WilliamVenner)`

> Convenience methods that use `match_indices` and `replace_range` to efficiently replace a substring in a string without reallocating, if capacity (and the implementation of `Vec::splice`) allows.

The intra-doc link to `str::replacen` is a direct url-based link to `str::replacen` in `std`'s docs to work around rust-lang#98941. This means that when building only `alloc`'s docs (and not `std`'s), it will be a broken link. There is precedent for this e.g. in [`core::hint::spin_loop`](https://doc.rust-lang.org/nightly/src/core/hint.rs.html#214) which links to `std::thread::yield_now` using a [url-based link](https://github.com/rust-lang/rust/blob/master/library/core/src/hint.rs#L265) and thus is a dead link when only building `core`'s docs.

ACP: rust-lang/libs-team#506
Retire ast::TyAliasWhereClauses.

`ast::TyAliasWhereClauses` is a tentative to avoid forgetting predicates when manipulating the AST.
It is incompatible with `cfg` attributes on where clauses.

This PR uses a regular `WhereClause` for the "second" clause.

Fixes rust-lang#138010
cc rust-lang#138037
…r=oli-obk

Revert constification of `AsRef for Cow` due to inference failure

Reported issue: rust-lang#147964
Original PR: rust-lang#145279
`const AsRef` tracking issue: rust-lang#143773

Should have additional crater run to verify this fixes the issue.
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Oct 23, 2025
@jhpratt
Copy link
Member Author

jhpratt commented Oct 23, 2025

@bors r+ rollup=never p=3

@bors
Copy link
Collaborator

bors commented Oct 23, 2025

📌 Commit 5d55418 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 Oct 23, 2025
@bors
Copy link
Collaborator

bors commented Oct 23, 2025

⌛ Testing commit 5d55418 with merge 469357e...

bors added a commit that referenced this pull request Oct 23, 2025
Rollup of 3 pull requests

Successful merges:

 - #134316 (Add `String::replace_first` and `String::replace_last`)
 - #147713 (Retire ast::TyAliasWhereClauses.)
 - #148011 (Revert constification of `AsRef for Cow` due to inference failure )

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

rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants