about summary refs log tree commit diff
path: root/library/std/src/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev@gmail.com>2021-02-21 15:26:40 +0900
committerGitHub <noreply@github.com>2021-02-21 15:26:40 +0900
commit56ae3fb2f0888a6a6857eec5c0109fcb3eefe258 (patch)
tree803e55be0e99dad3de5c5eb9e359203c2a93a8f7 /library/std/src/sys/unix/stack_overflow.rs
parent3219a100fab579015d56411f5a50dcb7ff10f39d (diff)
parent3ec1a28418472d64518efcb72e25ff976d6ff140 (diff)
downloadrust-56ae3fb2f0888a6a6857eec5c0109fcb3eefe258.tar.gz
rust-56ae3fb2f0888a6a6857eec5c0109fcb3eefe258.zip
Rollup merge of #81706 - SkiFire13:document-binaryheap-unsafe, r=Mark-Simulacrum
Document BinaryHeap unsafe functions

`BinaryHeap` contains some private safe functions but that are actually unsafe to call. This PR marks them `unsafe` and documents all the `unsafe` function calls inside them.

While doing this I might also have found a bug: some "SAFETY" comments in `sift_down_range` and `sift_down_to_bottom` are valid only if you assume that `child` doesn't overflow. However it may overflow if `end > isize::MAX` which can be true for ZSTs (but I think only for them). I guess the easiest fix would be to skip any sifting if `mem::size_of::<T> == 0`.

Probably conflicts with #81127 but solving the eventual merge conflict should be pretty easy.
Diffstat (limited to 'library/std/src/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions