Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0065763

Browse files
committed
core: Limit remaining f16 doctests to x86_64 linux
On s390x, every use of the f16 data type will currently ICEdue tollvm/llvm-project#50374,causing doctest failures on the platform.Most doctests were already restricted to certain platforms,so fix this by likewise restricting the remaining five.
1 parentc092b28 commit0065763

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

‎library/core/src/num/f16.rs‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,12 +353,15 @@ impl f16 {
353353
///
354354
/// ```
355355
/// #![feature(f16)]
356+
/// # // FIXME(f16_f128): LLVM crashes on s390x, llvm/llvm-project#50374
357+
/// # #[cfg(all(target_arch = "x86_64", target_os = "linux"))] {
356358
///
357359
/// let f = 7.0_f16;
358360
/// let g = -7.0_f16;
359361
///
360362
/// assert!(f.is_sign_positive());
361363
/// assert!(!g.is_sign_positive());
364+
/// # }
362365
/// ```
363366
#[inline]
364367
#[must_use]
@@ -376,12 +379,15 @@ impl f16 {
376379
///
377380
/// ```
378381
/// #![feature(f16)]
382+
/// # // FIXME(f16_f128): LLVM crashes on s390x, llvm/llvm-project#50374
383+
/// # #[cfg(all(target_arch = "x86_64", target_os = "linux"))] {
379384
///
380385
/// let f = 7.0_f16;
381386
/// let g = -7.0_f16;
382387
///
383388
/// assert!(!f.is_sign_negative());
384389
/// assert!(g.is_sign_negative());
390+
/// # }
385391
/// ```
386392
#[inline]
387393
#[must_use]
@@ -694,9 +700,12 @@ impl f16 {
694700
///
695701
/// ```
696702
/// #![feature(f16)]
703+
/// # // FIXME(f16_f128): LLVM crashes on s390x, llvm/llvm-project#50374
704+
/// # #[cfg(all(target_arch = "x86_64", target_os = "linux"))] {
697705
///
698706
/// let bytes = 12.5f16.to_be_bytes();
699707
/// assert_eq!(bytes, [0x4a, 0x40]);
708+
/// # }
700709
/// ```
701710
#[inline]
702711
#[unstable(feature ="f16", issue ="116909")]
@@ -715,9 +724,12 @@ impl f16 {
715724
///
716725
/// ```
717726
/// #![feature(f16)]
727+
/// # // FIXME(f16_f128): LLVM crashes on s390x, llvm/llvm-project#50374
728+
/// # #[cfg(all(target_arch = "x86_64", target_os = "linux"))] {
718729
///
719730
/// let bytes = 12.5f16.to_le_bytes();
720731
/// assert_eq!(bytes, [0x40, 0x4a]);
732+
/// # }
721733
/// ```
722734
#[inline]
723735
#[unstable(feature ="f16", issue ="116909")]
@@ -742,6 +754,8 @@ impl f16 {
742754
///
743755
/// ```
744756
/// #![feature(f16)]
757+
/// # // FIXME(f16_f128): LLVM crashes on s390x, llvm/llvm-project#50374
758+
/// # #[cfg(all(target_arch = "x86_64", target_os = "linux"))] {
745759
///
746760
/// let bytes = 12.5f16.to_ne_bytes();
747761
/// assert_eq!(
@@ -752,6 +766,7 @@ impl f16 {
752766
/// [0x40, 0x4a]
753767
/// }
754768
/// );
769+
/// # }
755770
/// ```
756771
#[inline]
757772
#[unstable(feature ="f16", issue ="116909")]

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp