Closed
Description
Location
Any try_reserve
methods of container types (12 in Rust 1,62.1, including duplicated ones in alloc
), and maybe corresponding try_reserve_exact
methods.
std::collections::BinaryHeap::try_reserve[_exact]
std::collections::VecDeque::try_reserve[_exact]
std::collections::HashMap::try_reserve
std::collections::HashSet::try_reserve
std::ffi::OsString::try_reserve[_exact]
std::path::PathBuf::try_reserve[_exact]
std::string::String::try_reserve[_exact]
std::vec::Vec::try_reserve[_exact]
- ... and corresponding methods in
alloc
.
Summary
Documentations for try_reserve
describes "If the capacity overflows, or the allocator reports a failure, then an error is returned.".
However, it does not give any guarantees about whether the content is preserved or not on that error.
This guarantee (or absence of the guarantee) should be explicitly described.
Metadata
Metadata
Assignees
Labels
Area: Documentation for any part of the project, including the compiler, standard library, and toolsRelevant to the library API team, which will review and decide on the PR/issue.This issue / PR is in PFCP or FCP with a disposition to merge it.The final comment period is finished for this PR / Issue.