Skip to content

Commit

Permalink
Add missing docs
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez authored and gnzlbg committed Dec 22, 2018
1 parent abcdfe3 commit 18ea4e0
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions stdsimd/arch/detect/error_macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
//! architecture. These macros provide a better error messages when the user
//! attempts to call them in a different architecture.

/// Prevents compilation if `is_x86_feature_detected` is used somewhere
/// else than `x86` and `x86_64` targets.
#[cfg(not(any(target_arch = "x86", target_arch = "x86_64")))]
#[macro_export]
#[unstable(feature = "stdsimd", issue = "27731")]
Expand All @@ -21,6 +23,8 @@ macro_rules! is_x86_feature_detected {
};
}

/// Prevents compilation if `is_arm_feature_detected` is used somewhere else
/// than `ARM` targets.
#[cfg(not(target_arch = "arm"))]
#[macro_export]
#[unstable(feature = "stdsimd", issue = "27731")]
Expand All @@ -40,6 +44,8 @@ macro_rules! is_arm_feature_detected {
};
}

/// Prevents compilation if `is_aarch64_feature_detected` is used somewhere else
/// than `aarch64` targets.
#[cfg(not(target_arch = "aarch64"))]
#[macro_export]
#[unstable(feature = "stdsimd", issue = "27731")]
Expand All @@ -59,6 +65,8 @@ macro_rules! is_aarch64_feature_detected {
};
}

/// Prevents compilation if `is_powerpc_feature_detected` is used somewhere else
/// than `PowerPC` targets.
#[cfg(not(target_arch = "powerpc"))]
#[macro_export]
#[unstable(feature = "stdsimd", issue = "27731")]
Expand All @@ -78,6 +86,8 @@ guarding it behind a cfg(target_arch) as follows:
};
}

/// Prevents compilation if `is_powerpc64_feature_detected` is used somewhere
/// else than `PowerPC64` targets.
#[cfg(not(target_arch = "powerpc64"))]
#[macro_export]
#[unstable(feature = "stdsimd", issue = "27731")]
Expand All @@ -97,6 +107,8 @@ guarding it behind a cfg(target_arch) as follows:
};
}

/// Prevents compilation if `is_mips_feature_detected` is used somewhere else
/// than `MIPS` targets.
#[cfg(not(target_arch = "mips"))]
#[macro_export]
#[unstable(feature = "stdsimd", issue = "27731")]
Expand All @@ -116,6 +128,8 @@ macro_rules! is_mips_feature_detected {
};
}

/// Prevents compilation if `is_mips64_feature_detected` is used somewhere else
/// than `MIPS64` targets.
#[cfg(not(target_arch = "mips64"))]
#[macro_export]
#[unstable(feature = "stdsimd", issue = "27731")]
Expand Down

0 comments on commit 18ea4e0

Please sign in to comment.