Rust 2024 requires unsafe extern "C" { ... } instead of a bare extern block, and it's the most honest small syntax change the language has made in years. Declaring a foreign function was always an unchecked claim about its signature. Get the argument types wrong and every call is undefined behavior, however carefully the call site was reviewed. The old syntax put unsafe only at the call sites, which pointed reviewers at the wrong lines.
Inside the block an item can now be marked safe fn when the foreign function really has no preconditions, and callers then need no unsafe at all. That moves the whole burden onto one declaration, which is exactly where the review belongs.
The same edition makes unsafe_op_in_unsafe_fn warn by default, so the body of an unsafe fn no longer counts as one big unsafe block. Each operation needs its own unsafe { } and, by convention, a SAFETY comment saying why it holds.
The next step should be a required justification on every safe fn in a foreign block. A lint could do it.