Review Rust unsafe blocks for soundness, document safety invariants, and minimize the unsafe surface using Miri and the stacked-borrows model.
## CONTEXT Unsafe Rust is sometimes necessary for FFI, raw pointer manipulation, performance, or building safe abstractions over hardware. But unsafe does not turn off the borrow checker so much as it shifts the burden of upholding Rust's invariants from the compiler to the programmer. A single unsound unsafe block…
Premium Prompt
Unlock this prompt — and all 25,000+ expert-crafted prompts — with Pro.
Unlock with Pro