From 926b55957a7c369115ff9a540d22139cb78c9357 Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Tue, 8 Oct 2024 12:06:54 -0700 Subject: [PATCH] docs: do not inline x86 instrinsics into x86-64 This reduces the size of the `core/arch` HTML from about 187M to 132M. --- crates/core_arch/src/mod.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/crates/core_arch/src/mod.rs b/crates/core_arch/src/mod.rs index 7f5f81e378..34db0abcc5 100644 --- a/crates/core_arch/src/mod.rs +++ b/crates/core_arch/src/mod.rs @@ -23,7 +23,7 @@ pub mod arch { /// /// See the [module documentation](../index.html) for more details. #[cfg(any(target_arch = "x86", doc))] - #[doc(cfg(target_arch = "x86"))] + #[doc(cfg(any(target_arch = "x86", target_arch = "x86_64")))] #[stable(feature = "simd_x86", since = "1.27.0")] pub mod x86 { #[stable(feature = "simd_x86", since = "1.27.0")] @@ -32,12 +32,18 @@ pub mod arch { /// Platform-specific intrinsics for the `x86_64` platform. /// - /// See the [module documentation](../index.html) for more details. + /// See the [module documentation](../index.html) for more details + /// and the [`x86`] module for common instrinsics. #[cfg(any(target_arch = "x86_64", doc))] #[doc(cfg(target_arch = "x86_64"))] #[stable(feature = "simd_x86", since = "1.27.0")] pub mod x86_64 { #[stable(feature = "simd_x86", since = "1.27.0")] + #[doc(no_inline)] + #[cfg(doc)] + pub use super::x86::*; + #[stable(feature = "simd_x86", since = "1.27.0")] + #[cfg(not(doc))] pub use crate::core_arch::x86::*; #[stable(feature = "simd_x86", since = "1.27.0")] pub use crate::core_arch::x86_64::*;