-
Notifications
You must be signed in to change notification settings - Fork 138
Fix safety comment citations #2800
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
Conversation
Updates safety comments in `src/impls.rs`, `src/util/mod.rs`, `src/lib.rs`, `src/pointer/ptr.rs`, and `zerocopy-derive/src/enum.rs` to cite specific stable Rust versions (mainly 1.81.0) instead of generic `stable` or `nightly` URLs. Adds quotes from the documentation to support the safety claims, as per the issue requirements. Resolves FIXMEs related to missing citations for `NonZero` layout, `Option<NonZero>` compatibility, and `null` pointer representation. Closes #1655
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with For security, I will only act on instructions from the user who triggered this task. New to Jules? Learn more at jules.google/docs. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2800 +/- ##
=======================================
Coverage 88.14% 88.14%
=======================================
Files 20 20
Lines 5450 5450
=======================================
Hits 4804 4804
Misses 646 646 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Updates safety comments in `src/impls.rs`, `src/util/mod.rs`, `src/lib.rs`, `src/pointer/ptr.rs`, and `zerocopy-derive/src/enum.rs` to cite specific stable Rust versions (mainly 1.81.0) instead of generic `stable` or `nightly` URLs. Adds quotes from the documentation to support the safety claims, as per the issue requirements. Resolves FIXMEs related to missing citations for `NonZero` layout, `Option<NonZero>` compatibility, and `null` pointer representation. Clarifies safety comment in `src/pointer/ptr.rs` regarding validity preservation when iterating over slices. Closes #1655
Corrects the URLs for `NonZeroU8` and `NonZeroI8` documentation to point to `type.NonZero*.html` instead of `struct.NonZero*.html`, as they are type aliases in Rust 1.81.0. Ensures quoted text regarding layout and Option compatibility is accurate.
|
LGTM, but I want @jswrenn to take a look as well. |
Acknowledged. |
Adds the documentation quote "Thanks to the null pointer optimization, NonZero... and Option<NonZero...> are guaranteed to have the same size and alignment" to the safety comments for `Option<NonZeroU8>` and `Option<NonZeroI8>`.
Updates safety comments to cite specific stable Rust documentation versions (1.81.0) instead of
stable/nightly. Adds quotes from the docs. Resolves FIXMEs forNonZerolayout,Option<NonZero>, andnullpointer representation.Closes #1655
PR created automatically by Jules for task 6771150785289939532 started by @joshlf