Repository navigation
Docs - type guarantees update - #129822
Conversation
|
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? |
|
A bit confused about the pin change, but the rest are okay to merge. Since Andrew is no longer on the review rotation I can take this. r? clarfonthey |
|
Also cc @WiktorPrzetacznik since I keep forgetting to ping people, if you remove the pin change and rebase I am fine merging this. |
Document layout of Saturating, similarly to Wrapping
8eb23d5 to
02d1672
Compare
|
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. |
|
@bors r+ rollup Thank you! |
|
Thanks, btw. I removed the String changes, as they're already present in recent main, which wasn't the case in 2024 when I started this PR |
…uwer Rollup of 9 pull requests Successful merges: - #163655 (explicitly handle tests that pass with -Znext-solver) - #159924 (Send -fno-lto when linker plugin LTO is not requested to avoid having GCC do LTO when using rustc_codegen_gcc) - #163572 (Update the minimum external LLVM to 22) - #129822 (Docs - type guarantees update) - #157973 (Distinguish `repr(C)` ZSTs from others in ABI compatibility rules) - #162332 (preserve overflow in builtin Field candidates) - #163574 (intrinsics: Rename `abort` to `abort_immediate`) - #163638 (avoid trivial `fn map_bound` validations) - #163660 (yeet compare-mode-coherence)
…uwer Rollup of 9 pull requests Successful merges: - #163655 (explicitly handle tests that pass with -Znext-solver) - #159924 (Send -fno-lto when linker plugin LTO is not requested to avoid having GCC do LTO when using rustc_codegen_gcc) - #163572 (Update the minimum external LLVM to 22) - #129822 (Docs - type guarantees update) - #157973 (Distinguish `repr(C)` ZSTs from others in ABI compatibility rules) - #162332 (preserve overflow in builtin Field candidates) - #163574 (intrinsics: Rename `abort` to `abort_immediate`) - #163638 (avoid trivial `fn map_bound` validations) - #163660 (yeet compare-mode-coherence)
Rollup merge of #129822 - WiktorPrzetacznik:docs-guarantees-update, r=clarfonthey Docs - type guarantees update **Content:** - Pin::map_unchecked | Safety section update - String::reserve, String::reserve_exact | Panic section update - Saturating | Introduce Layout section - Fix typos **Questions:** 1. This proposes to update String reserve methods docs: > Panics if the new capacity overflows [`usize`]. -> > Panics if the new capacity exceeds [`isize::MAX`] bytes. 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]
…uwer Rollup of 9 pull requests Successful merges: - rust-lang/rust#163655 (explicitly handle tests that pass with -Znext-solver) - rust-lang/rust#159924 (Send -fno-lto when linker plugin LTO is not requested to avoid having GCC do LTO when using rustc_codegen_gcc) - rust-lang/rust#163572 (Update the minimum external LLVM to 22) - rust-lang/rust#129822 (Docs - type guarantees update) - rust-lang/rust#157973 (Distinguish `repr(C)` ZSTs from others in ABI compatibility rules) - rust-lang/rust#162332 (preserve overflow in builtin Field candidates) - rust-lang/rust#163574 (intrinsics: Rename `abort` to `abort_immediate`) - rust-lang/rust#163638 (avoid trivial `fn map_bound` validations) - rust-lang/rust#163660 (yeet compare-mode-coherence)
…uwer Rollup of 9 pull requests Successful merges: - rust-lang/rust#163655 (explicitly handle tests that pass with -Znext-solver) - rust-lang/rust#159924 (Send -fno-lto when linker plugin LTO is not requested to avoid having GCC do LTO when using rustc_codegen_gcc) - rust-lang/rust#163572 (Update the minimum external LLVM to 22) - rust-lang/rust#129822 (Docs - type guarantees update) - rust-lang/rust#157973 (Distinguish `repr(C)` ZSTs from others in ABI compatibility rules) - rust-lang/rust#162332 (preserve overflow in builtin Field candidates) - rust-lang/rust#163574 (intrinsics: Rename `abort` to `abort_immediate`) - rust-lang/rust#163638 (avoid trivial `fn map_bound` validations) - rust-lang/rust#163660 (yeet compare-mode-coherence)
…uwer Rollup of 9 pull requests Successful merges: - rust-lang/rust#163655 (explicitly handle tests that pass with -Znext-solver) - rust-lang/rust#159924 (Send -fno-lto when linker plugin LTO is not requested to avoid having GCC do LTO when using rustc_codegen_gcc) - rust-lang/rust#163572 (Update the minimum external LLVM to 22) - rust-lang/rust#129822 (Docs - type guarantees update) - rust-lang/rust#157973 (Distinguish `repr(C)` ZSTs from others in ABI compatibility rules) - rust-lang/rust#162332 (preserve overflow in builtin Field candidates) - rust-lang/rust#163574 (intrinsics: Rename `abort` to `abort_immediate`) - rust-lang/rust#163638 (avoid trivial `fn map_bound` validations) - rust-lang/rust#163660 (yeet compare-mode-coherence)
…uwer Rollup of 9 pull requests Successful merges: - rust-lang/rust#163655 (explicitly handle tests that pass with -Znext-solver) - rust-lang/rust#159924 (Send -fno-lto when linker plugin LTO is not requested to avoid having GCC do LTO when using rustc_codegen_gcc) - rust-lang/rust#163572 (Update the minimum external LLVM to 22) - rust-lang/rust#129822 (Docs - type guarantees update) - rust-lang/rust#157973 (Distinguish `repr(C)` ZSTs from others in ABI compatibility rules) - rust-lang/rust#162332 (preserve overflow in builtin Field candidates) - rust-lang/rust#163574 (intrinsics: Rename `abort` to `abort_immediate`) - rust-lang/rust#163638 (avoid trivial `fn map_bound` validations) - rust-lang/rust#163660 (yeet compare-mode-coherence)
…uwer Rollup of 9 pull requests Successful merges: - rust-lang/rust#163655 (explicitly handle tests that pass with -Znext-solver) - rust-lang/rust#159924 (Send -fno-lto when linker plugin LTO is not requested to avoid having GCC do LTO when using rustc_codegen_gcc) - rust-lang/rust#163572 (Update the minimum external LLVM to 22) - rust-lang/rust#129822 (Docs - type guarantees update) - rust-lang/rust#157973 (Distinguish `repr(C)` ZSTs from others in ABI compatibility rules) - rust-lang/rust#162332 (preserve overflow in builtin Field candidates) - rust-lang/rust#163574 (intrinsics: Rename `abort` to `abort_immediate`) - rust-lang/rust#163638 (avoid trivial `fn map_bound` validations) - rust-lang/rust#163660 (yeet compare-mode-coherence)
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]