From 586ef83f3f589e4d1eab7895982b9e7cee827fce Mon Sep 17 00:00:00 2001 From: Jubilee Young Date: Tue, 16 Jul 2024 16:17:38 -0700 Subject: [PATCH] uefi: Forbid unwrapped unsafe in platform modules --- library/std/src/os/uefi/mod.rs | 1 + library/std/src/sys/pal/uefi/mod.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/library/std/src/os/uefi/mod.rs b/library/std/src/os/uefi/mod.rs index 8ef05eee1f4..b42d796b28f 100644 --- a/library/std/src/os/uefi/mod.rs +++ b/library/std/src/os/uefi/mod.rs @@ -2,6 +2,7 @@ #![unstable(feature = "uefi_std", issue = "100499")] #![doc(cfg(target_os = "uefi"))] +#![forbid(unsafe_op_in_unsafe_fn)] pub mod env; #[path = "../windows/ffi.rs"] diff --git a/library/std/src/sys/pal/uefi/mod.rs b/library/std/src/sys/pal/uefi/mod.rs index 408031a4616..4d50d9e8c3d 100644 --- a/library/std/src/sys/pal/uefi/mod.rs +++ b/library/std/src/sys/pal/uefi/mod.rs @@ -11,6 +11,7 @@ //! //! [`OsStr`]: crate::ffi::OsStr //! [`OsString`]: crate::ffi::OsString +#![forbid(unsafe_op_in_unsafe_fn)] pub mod alloc; pub mod args;