Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core: Limit remaining f16 doctests to x86_64 linux #127588

Merged
merged 1 commit into from
Jul 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions library/core/src/num/f16.rs
Original file line number Diff line number Diff line change
Expand Up @@ -353,12 +353,15 @@ impl f16 {
///
/// ```
/// #![feature(f16)]
/// # // FIXME(f16_f128): LLVM crashes on s390x, llvm/llvm-project#50374
/// # #[cfg(all(target_arch = "x86_64", target_os = "linux"))] {
///
/// let f = 7.0_f16;
/// let g = -7.0_f16;
///
/// assert!(f.is_sign_positive());
/// assert!(!g.is_sign_positive());
/// # }
/// ```
#[inline]
#[must_use]
Expand All @@ -376,12 +379,15 @@ impl f16 {
///
/// ```
/// #![feature(f16)]
/// # // FIXME(f16_f128): LLVM crashes on s390x, llvm/llvm-project#50374
/// # #[cfg(all(target_arch = "x86_64", target_os = "linux"))] {
///
/// let f = 7.0_f16;
/// let g = -7.0_f16;
///
/// assert!(!f.is_sign_negative());
/// assert!(g.is_sign_negative());
/// # }
/// ```
#[inline]
#[must_use]
Expand Down Expand Up @@ -694,9 +700,12 @@ impl f16 {
///
/// ```
/// #![feature(f16)]
/// # // FIXME(f16_f128): LLVM crashes on s390x, llvm/llvm-project#50374
/// # #[cfg(all(target_arch = "x86_64", target_os = "linux"))] {
///
/// let bytes = 12.5f16.to_be_bytes();
/// assert_eq!(bytes, [0x4a, 0x40]);
/// # }
/// ```
#[inline]
#[unstable(feature = "f16", issue = "116909")]
Expand All @@ -715,9 +724,12 @@ impl f16 {
///
/// ```
/// #![feature(f16)]
/// # // FIXME(f16_f128): LLVM crashes on s390x, llvm/llvm-project#50374
/// # #[cfg(all(target_arch = "x86_64", target_os = "linux"))] {
///
/// let bytes = 12.5f16.to_le_bytes();
/// assert_eq!(bytes, [0x40, 0x4a]);
/// # }
/// ```
#[inline]
#[unstable(feature = "f16", issue = "116909")]
Expand All @@ -742,6 +754,8 @@ impl f16 {
///
/// ```
/// #![feature(f16)]
/// # // FIXME(f16_f128): LLVM crashes on s390x, llvm/llvm-project#50374
/// # #[cfg(all(target_arch = "x86_64", target_os = "linux"))] {
///
/// let bytes = 12.5f16.to_ne_bytes();
/// assert_eq!(
Expand All @@ -752,6 +766,7 @@ impl f16 {
/// [0x40, 0x4a]
/// }
/// );
/// # }
/// ```
#[inline]
#[unstable(feature = "f16", issue = "116909")]
Expand Down
Loading