Repository navigation
Rewrite String::replace_range - #149447
Merged
Merged
Conversation
Collaborator
|
rustbot has assigned @Mark-Simulacrum. Use |
tidely
reviewed
Dec 2, 2025
|
|
||
| #[test] | ||
| #[should_panic] | ||
| #[should_panic = "range start index 18446744073709551615 out of range for slice of length 3"] |
There was a problem hiding this comment.
Not sure if these tests are gated, but generally usize::MAX depends on the pointer width of the platform, so we shouldn't hard code it
Member
|
r=me with comment fixed @bors try jobs=i686-gnu-* |
This comment has been minimized.
This comment has been minimized.
rust-bors Bot
added a commit
that referenced
this pull request
Dec 8, 2025
Rewrite `String::replace_range` try-job: i686-gnu-*
This comment has been minimized.
This comment has been minimized.
Contributor
|
💔 Test for f4bd5be failed: CI. Failed jobs:
|
This simplifies the code, provides better panic messages, and avoids an integer overflow.
theemathas
force-pushed
the
string-replace_range
branch
from
December 8, 2025 10:44
6ee39cc to
5f5286b
Compare
Contributor
Author
|
@bors r=Mark-Simulacrum |
Contributor
|
@theemathas: 🔑 Insufficient privileges: Not in reviewers |
Contributor
Author
|
@rustbot ready |
Member
|
@bors r+ |
Contributor
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Dec 28, 2025
…=Mark-Simulacrum Rewrite `String::replace_range` This simplifies the code, provides better panic messages, and avoids an integer overflow.
This was referenced Dec 28, 2025
bors
added a commit
that referenced
this pull request
Dec 28, 2025
…uwer Rollup of 5 pull requests Successful merges: - #147499 (Implement round-ties-to-even for Duration Debug for consistency with f64) - #149447 (Rewrite `String::replace_range`) - #149469 (Leverage &mut in OnceLock when possible) - #149921 (Add new source component that includes GPL-licensed source) - #150460 (fix ManuallyDrop::into_inner aliasing (Miri) issues) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
that referenced
this pull request
Dec 28, 2025
Rollup merge of #149447 - theemathas:string-replace_range, r=Mark-Simulacrum Rewrite `String::replace_range` This simplifies the code, provides better panic messages, and avoids an integer overflow.
github-actions Bot
pushed a commit
to rust-lang/miri
that referenced
this pull request
Dec 29, 2025
…uwer Rollup of 5 pull requests Successful merges: - rust-lang/rust#147499 (Implement round-ties-to-even for Duration Debug for consistency with f64) - rust-lang/rust#149447 (Rewrite `String::replace_range`) - rust-lang/rust#149469 (Leverage &mut in OnceLock when possible) - rust-lang/rust#149921 (Add new source component that includes GPL-licensed source) - rust-lang/rust#150460 (fix ManuallyDrop::into_inner aliasing (Miri) issues) r? `@ghost` `@rustbot` modify labels: rollup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This simplifies the code, provides better panic messages, and avoids an integer overflow.