Skip to content

Commit

Permalink
docs: do not inline x86 instrinsics into x86-64
Browse files Browse the repository at this point in the history
This reduces the size of the `core/arch` HTML from about
187M to 132M.
  • Loading branch information
notriddle committed Oct 8, 2024
1 parent ace7222 commit 988350f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions crates/core_arch/src/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand All @@ -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::*;
Expand Down

0 comments on commit 988350f

Please sign in to comment.