mirror of
https://github.com/uutils/platform-info.git
synced 2026-06-10 15:48:45 -07:00
Add unsafe_op_in_unsafe_fn lint
Require explicit unsafe blocks inside unsafe functions to make safety boundaries more precise. This is a forward-looking lint that prevents future unsafe code from implicitly relying on the enclosing unsafe fn.
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#![doc = include_str!("../README.md")]
|
||||
// spell-checker:ignore (API) nodename osname sysname
|
||||
// spell-checker:ignore (uutils) coreutils uutils
|
||||
#![warn(unsafe_op_in_unsafe_fn)] // require explicit unsafe blocks inside unsafe fns
|
||||
#![warn(unused_results)] // enable warnings for unused results
|
||||
|
||||
use std::ffi::OsStr;
|
||||
|
||||
Reference in New Issue
Block a user