From 87ef8e46d0c5685155685d4ae07f19b0dd097f90 Mon Sep 17 00:00:00 2001 From: "Hadrien G." Date: Fri, 23 Feb 2024 09:21:25 +0100 Subject: [PATCH 1/2] Turns out doc(cfg()) is not the valid way to hide cfg from docs --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index d30572f9..f366909c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -260,7 +260,7 @@ pub type ThreadId = hwloc_thread_t; /// Get the current thread's identifier through the libc or windows API #[cfg(not(target_os = "windows"))] -#[cfg_attr(docsrs, doc(cfg()))] +#[cfg_attr(docsrs, doc(cfg(all())))] pub fn current_thread_id() -> ThreadId { // SAFETY: Should be always safe to call let id = unsafe { libc::pthread_self() }; @@ -279,7 +279,7 @@ pub fn current_thread_id() -> ThreadId { // /// Get the current thread's identifier through the libc or windows API #[cfg(target_os = "windows")] -#[cfg_attr(docsrs, doc(cfg()))] +#[cfg_attr(docsrs, doc(cfg(all())))] pub fn current_thread_id() -> ThreadId { // SAFETY: Should be always safe to call on Windows unsafe { windows_sys::Win32::System::Threading::GetCurrentThread() } From ef0fdd0ca623c2de09b6379349ae7813f366592c Mon Sep 17 00:00:00 2001 From: "Hadrien G." Date: Fri, 23 Feb 2024 09:25:53 +0100 Subject: [PATCH 2/2] Will need an extra tag to fix the docs.rs build --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 46239e48..09cbdb6f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,7 +36,7 @@ overflow-checks = false [package] name = "hwlocality" -version = "1.0.0-alpha.2" +version = "1.0.0-alpha.3" authors.workspace = true edition.workspace = true rust-version.workspace = true