-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document all unsafety used in libcore and libstd #66219
Comments
Hi! I'm interested in working on this. |
@rustbot claim |
…l-str, r=Amanieu Document unsafe blocks in core::{cell, str, sync} Split from rust-lang#66506 (issue rust-lang#66219). Hopefully doing a chunk at a time is more manageable! r? @RalfJung
…l-str, r=Amanieu Document unsafe blocks in core::{cell, str, sync} Split from rust-lang#66506 (issue rust-lang#66219). Hopefully doing a chunk at a time is more manageable! r? @RalfJung
…rk-Simulacrum Document unsafe blocks in core::fmt r? @RalfJung CC: @rust-lang/wg-unsafe-code-guidelines rust-lang#66219 Sorry for the hiatus, but here's a few more files with the unsafe blocks documented! I think working on it smaller chunks like this will be easier for everyone.
…rk-Simulacrum Document unsafe blocks in core::fmt r? @RalfJung CC: @rust-lang/wg-unsafe-code-guidelines rust-lang#66219 Sorry for the hiatus, but here's a few more files with the unsafe blocks documented! I think working on it smaller chunks like this will be easier for everyone.
…rk-Simulacrum Document unsafe blocks in core::fmt r? @RalfJung CC: @rust-lang/wg-unsafe-code-guidelines rust-lang#66219 Sorry for the hiatus, but here's a few more files with the unsafe blocks documented! I think working on it smaller chunks like this will be easier for everyone.
Hello, Is anyone working on rust/src/libcore/slice/sort.rs Lines 35 to 55 in 2dc5b60
This can be shown to be safe because |
…r=Mark-Simulacrum Document unsafety for `*const T` and `*mut T` Helps with rust-lang#66219 r? @Mark-Simulacrum
… r=joshtriplett Document unsafety in slice/sort.rs Let me know if these documentations are accurate c: I don't think I am capable enough to document the safety of `partition_blocks`, however. Related issue rust-lang#66219
…e-slice, r=LukasKalbertodt Document unsafety in library/core/src/slice/mod.rs Restart where rust-lang#73555 left off, helping with rust-lang#66219.
I did |
Contributes to rust-lang#66219
Document unsafety in core::slice::memchr Contributes to rust-lang#66219 Note sure if that's good enough, especially for the `align_to` call. The docs only mention transmuting and I don't think that everything related to reference lifetimes and state validity mentioned in the [nomicon](https://doc.rust-lang.org/nomicon/transmutes.html) are relevant here.
With #87127, only some |
…cottmcm Add safety comments in private core::slice::rotate::ptr_rotate function Helps with rust-lang#66219. `@rustbot` label C-cleanup T-compiler T-libs
…cottmcm Add safety comments in private core::slice::rotate::ptr_rotate function Helps with rust-lang#66219. ``@rustbot`` label C-cleanup T-compiler T-libs
…cottmcm Add safety comments in private core::slice::rotate::ptr_rotate function Helps with rust-lang#66219. ```@rustbot``` label C-cleanup T-compiler T-libs
…Mark-Simulacrum Add SAFETY comments to core::slice::sort::partition_in_blocks A few more SAFETY comments for rust-lang#66219. There are still a few more in this module. `@rustbot` label T-libs T-compiler C-cleanup
Remove ignore-tidy-undocumented-unsafe from core::slice::sort Write down the missing safety arguments to be able to remove `ignore-tidy-undocumented-unsafe` from `core::slice::sort`. Helps with rust-lang#66219 `@rustbot` label C-cleanup T-libs
Remove ignore-tidy-undocumented-unsafe from core::slice::sort Write down the missing safety arguments to be able to remove `ignore-tidy-undocumented-unsafe` from `core::slice::sort`. Helps with rust-lang#66219 ``@rustbot`` label C-cleanup T-libs
With #88412 merged I believe libstd is now free of |
The repository still contains many instances of
// ignore-tidy-undocumented-unsafe
We should eliminate all of them by documenting the unsafe used in those files.
Documenting unsafe blocks works by adding a
// SAFETY:
comment infront of them explaining why the unsafe block is ok. If there is an explanation about the unsafety elsewhere in the file, you can also leave a// SAFETY:
comment explaining that the overarching logic is explained elsewhere (and mention where, too!)cc @Centril
not sure what labels to add to this issue.
See https://github.com/rust-lang/rust/pull/63793/files for examples and the introduction of the unsafety tidy check
The text was updated successfully, but these errors were encountered: