Detect and Fix Overscope unsafe Block

I think Rust is supposed to be usable without an IDE. I often look at Rust code without an IDE. doc.rust-lang.org generates links to pure text source code on a website. Code reviews are often done on text diffs, not in an IDE.

I always prefer minimal unsafe blocks. I'd much prefer if individual function calls could be directly marked.

Every unsafe function call should be checked to see if the function's preconditions are satisfied as documented by the function.

2 Likes