Safety Comments Matter

TL;DR: This article is highly inspired by this GitHub comment . Safety Comments Matter SAFETY comments are always welcome when dealing with unsafe code in Rust. The clippy even has a lint to enforce writing them: rust-lang.github.io/rust-clippy/#undocumented_unsafe_blocks : #![warn(clippy :: undocumented_unsafe_blocks)] You can find such comments in many crates and std. Example : // SAFETY:…