From 984ecefed8a12fc31200f5307f07acd7ce6b18c9 Mon Sep 17 00:00:00 2001 From: Ayush Singh Date: Thu, 21 Sep 2023 18:59:43 +0530 Subject: [PATCH] Fixes from PR - Hide Docs - Use repr_unpacked error Signed-off-by: Ayush Singh --- library/std/src/io/error.rs | 8 ++++---- library/std/src/os/mod.rs | 2 +- src/tools/tidy/src/pal.rs | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/library/std/src/io/error.rs b/library/std/src/io/error.rs index f63142ff01fc0..5966416e32a19 100644 --- a/library/std/src/io/error.rs +++ b/library/std/src/io/error.rs @@ -1,14 +1,14 @@ #[cfg(test)] mod tests; -#[cfg(target_pointer_width = "64")] +#[cfg(all(target_pointer_width = "64", not(target_os = "uefi")))] mod repr_bitpacked; -#[cfg(target_pointer_width = "64")] +#[cfg(all(target_pointer_width = "64", not(target_os = "uefi")))] use repr_bitpacked::Repr; -#[cfg(not(target_pointer_width = "64"))] +#[cfg(any(not(target_pointer_width = "64"), target_os = "uefi"))] mod repr_unpacked; -#[cfg(not(target_pointer_width = "64"))] +#[cfg(any(not(target_pointer_width = "64"), target_os = "uefi"))] use repr_unpacked::Repr; use crate::error; diff --git a/library/std/src/os/mod.rs b/library/std/src/os/mod.rs index 41aa0472f526a..11ad21515fdec 100644 --- a/library/std/src/os/mod.rs +++ b/library/std/src/os/mod.rs @@ -142,7 +142,7 @@ pub mod solid; #[cfg(target_os = "tvos")] #[path = "ios/mod.rs"] pub(crate) mod tvos; -#[cfg(any(target_os = "uefi", doc))] +#[cfg(target_os = "uefi")] pub mod uefi; #[cfg(target_os = "vita")] pub mod vita; diff --git a/src/tools/tidy/src/pal.rs b/src/tools/tidy/src/pal.rs index 3a4d9c53d7bc4..5f6b63a67fda7 100644 --- a/src/tools/tidy/src/pal.rs +++ b/src/tools/tidy/src/pal.rs @@ -56,6 +56,7 @@ const EXCEPTION_PATHS: &[&str] = &[ "library/std/src/path.rs", "library/std/src/sys_common", // Should only contain abstractions over platforms "library/std/src/net/test.rs", // Utility helpers for tests + "library/std/src/io/error.rs", // Repr unpacked needed for UEFI ]; pub fn check(path: &Path, bad: &mut bool) {