Skip to content

Conversation

@leftmostcat
Copy link

Document panics in String and Vec due to capacity overflowing isize::MAX. Correct outdated claims of usize::MAX limit.

Fixes #148598.

Ping @lolbinarycat

@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 Nov 7, 2025
@rustbot
Copy link
Collaborator

rustbot commented Nov 7, 2025

r? @joboet

rustbot has assigned @joboet.
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

@rust-log-analyzer

This comment has been minimized.

@leftmostcat
Copy link
Author

At a glance, the build failures appear to be related to CI setup and not to these changes.

@lolbinarycat
Copy link
Contributor

CI is currently broken, it should be fixed once #148665 is merged.

@rustbot

This comment has been minimized.

Copy link
Member

@joboet joboet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thank you!

View changes since this review

///
/// # Panics
///
/// Panics if the new capacity exceeds `isize::MAX` _bytes_.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There isn't an old capacity here.

Suggested change
/// Panics if the new capacity exceeds `isize::MAX` _bytes_.
/// Panics if the capacity exceeds `isize::MAX` _bytes_.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do prefer the suggested wording. Presently, Vec uses the "new capacity" phrasing; should I adjust that as well?

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 13, 2025
@rustbot
Copy link
Collaborator

rustbot commented Nov 17, 2025

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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.

String methods do not acknowladge isize::MAX limit like Vec methods do

5 participants