- Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
A-lintArea: New lintsArea: New lints
Description
What it does
Unsafe attributes have been stabilized (rust-lang/rust#128771, rust-lang/rust#123757), thus it would be nice to have a lint that ensures // SAFETY
comments are in place.
Since undocumented_unsafe_blocks
covers impl
s too, perhaps it should also cover this too, although it may be best to possibly split them (but that is a different issue).
See #13317 as well.
Advantage
No response
Drawbacks
No response
Example
#[unsafe(no_mangle)] pub fn f() {}
Should be written as:
// SAFETY: ... #[unsafe(no_mangle)] pub fn f() {}
Metadata
Metadata
Assignees
Labels
A-lintArea: New lintsArea: New lints