-
Notifications
You must be signed in to change notification settings - Fork 14k
Open
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsA-strArea: str and StringArea: str and StringE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.P-mediumMedium priorityMedium priorityT-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Description
Location (URL)
https://doc.rust-lang.org/nightly/std/string/struct.String.html#method.reserve
Summary
All the Vec methods that allocate give a disclaimer about how Rust allocations can't exceed isize::MAX bytes, however, (most) String methods that allocate do not have the same disclaimer.
reserve and reserve_exact are the worst here, as they actually have the wrong disclaimer, claiming the limit is usize::MAX instead!
Metadata
Metadata
Assignees
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsA-strArea: str and StringArea: str and StringE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.P-mediumMedium priorityMedium priorityT-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.