[upstream staging] Deny unsafe_op_in_unsafe_fn in unsafe-bearing crates - #4
[upstream staging] Deny unsafe_op_in_unsafe_fn in unsafe-bearing crates#4duksh wants to merge 1 commit into
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Requires every unsafe operation inside an unsafe fn to be wrapped in an explicit unsafe block, complementing the existing clippy::undocumented_unsafe_blocks deny so each such block also carries a SAFETY comment. The codebase already complies; this prevents silent regressions. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DWoMomNAcBM3e8duJrb2do
520233b to
cdc95ba
Compare
|
Submitted upstream as pyca#15327 — closing this staging PR (validation complete: all 66 runnable jobs green, full local cargo check/clippy/fmt clean; ppc64le leg unrunnable on forks). Do not delete the branch until the upstream PR resolves. Generated by Claude Code |
Summary
Staging PR for upstream submission to pyca/cryptography. Submit upstream via: pyca/cryptography@main...duksh:cryptography:claude/upstream-unsafe-op-lint
Adds
unsafe_op_in_unsafe_fnto the existing#[deny(...)]in the four crates that contain unsafe code (cryptography-rust,cryptography-openssl,cryptography-cffi,cryptography-keepalive). Every unsafe operation inside anunsafe fnmust now sit in an explicitunsafeblock — which, combined with the already-deniedclippy::undocumented_unsafe_blocks, means each one also carries a// SAFETY:comment. The codebase already complies; this prevents silent regressions.Testing
cargo check --locked --workspace: clean, zero violations.cargo fmt --all -- --check: clean.cargo clippy --locked --all: zero warnings/errors.🤖 Generated with Claude Code
https://claude.ai/code/session_01DWoMomNAcBM3e8duJrb2do
Generated by Claude Code