alloc crate: shrink undocumented unsafe blocks - #162102
Conversation
This comment has been minimized.
This comment has been minimized.
31cefcb to
ff4f5cc
Compare
This comment has been minimized.
This comment has been minimized.
Reduce the scope of `unsafe` blocks that are not yet documented by moving safe operations out of the blocks, making it easier to add the missing documentation in the future.
ff4f5cc to
b5e8344
Compare
|
r? @JohnTitor rustbot has assigned @JohnTitor. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
Cross link #160941 r? @clarfonthey |
|
@bors r+ rollup Thank you! |
…oc, r=clarfonthey `alloc` crate: shrink undocumented `unsafe` blocks Reduce the scope of `unsafe` blocks that are not yet documented by moving safe operations out of the blocks, making it easier to add the missing documentation in the future.
Is it worth sending PRs to shrink |
|
I think in general we're fine with it if it's adding useful docs; discretion is always preferred here. |
My question isn't about adding docs, but rather just moving what statements are included in unsafe blocks I'll send a PR with some examples |
…oc, r=clarfonthey `alloc` crate: shrink undocumented `unsafe` blocks Reduce the scope of `unsafe` blocks that are not yet documented by moving safe operations out of the blocks, making it easier to add the missing documentation in the future.
|
Oh, sorry, for some reason my thought process was that you might be splitting up a few unsafe blocks into multiple safety comments, which would require stricter review/need those comments to be written. Absolutely, I think just moving more unsafe code out of them to really hone in on what's documented is helpful. |
…uwer Rollup of 11 pull requests Successful merges: - #151618 (rustdoc: add `--print` option) - #161287 (Update `icu_list` dependency to 2.3) - #161767 (change DEFAULT_STACK_SIZE to be 32MB on s390x) - #161968 (Diverse offload fixes) - #161971 (Remove -Zsaturating-float-casts flag) - #162071 (Fix ICE of getting item name from RPITIT) - #161209 (Rework `next_power_of_two` to always be `1 << …`) - #162073 (Change some `Infallible` to `!` in std) - #162086 (Remove `gate_check` from `AttributeStability::Unstable`) - #162102 (`alloc` crate: shrink undocumented `unsafe` blocks) - #162110 (make it clear that Range cannot represent arbitrary ranges)
Reduce the scope of
unsafeblocks that are not yet documented by moving safe operations out of the blocks, making it easier to add the missing documentation in the future.