From f9f31f89d7104f9636e9795da309f5e8127c705e Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 30 Mar 2026 16:59:05 +0200 Subject: [PATCH] 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. --- src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib.rs b/src/lib.rs index 5452693..473845c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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;