-
Notifications
You must be signed in to change notification settings - Fork 105
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
Annotate all unsafe
blocks with a safety comment and prevent regressions
#429
Comments
This builds on new documentation added in rust-lang/rust#115522. Makes progress on #429
This builds on new documentation added in rust-lang/rust#115522. Makes progress on #429
* Add TODOs related to #429 and quotes to safety comments. * Update src/lib.rs * Update src/lib.rs * Update src/lib.rs --------- Co-authored-by: Joshua Liebow-Feeser <[email protected]>
Add axioms and lemmas which are useful in proving the soundness of some trait impls. Makes progress on #429
Add axioms and lemmas which are useful in proving the soundness of some trait impls. Makes progress on #429
Add axioms and lemmas which are useful in proving the soundness of some trait impls. Makes progress on #429
Add axioms and lemmas which are useful in proving the soundness of some trait impls. Makes progress on #429
Add axioms and lemmas which are useful in proving the soundness of some trait impls. Makes progress on #429
Hi, is this issue still open? |
Yes! We have ~20 instances of
|
Yes, I am interested in this, thank you! |
Makes progress on #429
Can I work on this if this is still open? |
As part of #61, we need to make sure that all
unsafe
code is proven to be sound. Currently, allunsafe
code is either documented with a safety comment (// SAFETY: ...
), or is marked with a TODO that references this issue. Our goal is to reach 100% safety comment coverage, and to not regress once we've reached 100%. To that end, we enforce theclippy::undocumented_unsafe_blocks
lint to prevent regressions.A note on linting: It'd be nice to be able to replace the top-level
#![deny(clippy::undocumented_unsafe_blocks)]
with aforbid
once all TODOs are burned down, but unfortunately oursafety_comment!
macro relies on the ability to use#[allow(clippy::undocumented_unsafe_blocks)]
, so we have to settle for a deny.In order to ensure that our soundness is forwards-compatible, safety comments must satisfy the following criteria:
Mentoring instructions
TODO(#429)
in a comment; leave a GitHub comment on this issue to claim that instance to avoid duplicated work. Write a safety comment that abides by the requirements listed above.Feel free to ask for help here if you're stuck or have questions!
List of suggested safety comments
List
This list contains safety comments which are good starter safety comments if you're not already familiar with writing them.
zerocopy/src/lib.rs
Lines 757 to 767 in f001cf2
zerocopy/src/lib.rs
Lines 757 to 767 in f001cf2
The text was updated successfully, but these errors were encountered: