Docs - type guarantees update#129822
Docs - type guarantees update#129822WiktorPrzetacznik wants to merge 4 commits intorust-lang:mainfrom
Conversation
Update safety section that was probably copy-pasted from _mut version
The previous version mentioned panicing when capacity exceeds usize, but that's unprecise. More accurate note mentions isize::MAX
Document layout of Saturating, similarly to Wrapping
|
Have these guarantees been discussed and approved somewhere? The |
|
@cupiver About Saturating - I provoked some discussion on that topic - let's wait for more thoughts on this. |
|
@rustbot author
You can use |
|
@WiktorPrzetacznik |
|
@alex-semenyuk |
|
r? libs-api |
|
We discussed this during today's libs-API meeting, it looks like there previously was no guarantee for the Pin is subtle, so we weren't sure on the spot if this constitutes a new guarantee or a clarification, so we'd like input from a Pin expert on that. |
|
☔ The latest upstream changes (presumably #149682) made this pull request unmergeable. Please resolve the merge conflicts. |
|
@rustbot author |
|
Reminder, once the PR becomes ready for a review, use |
|
Ok, but what do I do with it? Saturating needs FCP, pin is stuck in oblivion. Are you OK with the other changes? |
Content:
Questions:
This proposes to update String reserve methods docs:
->
There are a few other types that are based on Vec and offer similar reserve API (like BinaryHeap).
Should they be updated, too?
ACP:
rust-lang/libs-team#482[not required]