fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0080]: evaluation of constant value failed 2 --> $SRC_DIR/core/src/num/f32.rs:LL:COL 3 | 4 = note: the evaluated program panicked at 'const-eval error: cannot use f32::to_bits on a NaN', $SRC_DIR/core/src/num/f32.rs:LL:COL 5 | 6note: inside `core::f32::<impl f32>::to_bits::ct_f32_to_u32` 7 --> $SRC_DIR/core/src/num/f32.rs:LL:COL 8note: inside `core::f32::<impl f32>::to_bits` 9 --> $SRC_DIR/core/src/num/f32.rs:LL:COL 10note: inside `f32::MASKED_NAN1` 11 --> $DIR/const-float-bits-reject-conv.rs:28:30 12 | 13LL | const MASKED_NAN1: u32 = f32::NAN.to_bits() ^ 0x002A_AAAA; 14 | ^^^^^^^^^^^^^^^^^^ 15 = note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info) 16 17error[E0080]: evaluation of constant value failed 18 --> $SRC_DIR/core/src/num/f32.rs:LL:COL 19 | 20 = note: the evaluated program panicked at 'const-eval error: cannot use f32::to_bits on a NaN', $SRC_DIR/core/src/num/f32.rs:LL:COL 21 | 22note: inside `core::f32::<impl f32>::to_bits::ct_f32_to_u32` 23 --> $SRC_DIR/core/src/num/f32.rs:LL:COL 24note: inside `core::f32::<impl f32>::to_bits` 25 --> $SRC_DIR/core/src/num/f32.rs:LL:COL 26note: inside `f32::MASKED_NAN2` 27 --> $DIR/const-float-bits-reject-conv.rs:30:30 28 | 29LL | const MASKED_NAN2: u32 = f32::NAN.to_bits() ^ 0x0055_5555; 30 | ^^^^^^^^^^^^^^^^^^ 31 = note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info) 32 33note: erroneous constant encountered 34 --> $DIR/const-float-bits-reject-conv.rs:35:34 35 | 36LL | const_assert!(f32::from_bits(MASKED_NAN1).is_nan()); 37 | ^^^^^^^^^^^ 38 39note: erroneous constant encountered 40 --> $DIR/const-float-bits-reject-conv.rs:36:34 41 | 42LL | const_assert!(f32::from_bits(MASKED_NAN1).is_nan()); 43 | ^^^^^^^^^^^ 44 45note: erroneous constant encountered 46 --> $DIR/const-float-bits-reject-conv.rs:42:34 47 | 48LL | const_assert!(f32::from_bits(MASKED_NAN1).to_bits(), MASKED_NAN1); 49 | ^^^^^^^^^^^ 50 51note: erroneous constant encountered 52 --> $DIR/const-float-bits-reject-conv.rs:43:34 53 | 54LL | const_assert!(f32::from_bits(MASKED_NAN2).to_bits(), MASKED_NAN2); 55 | ^^^^^^^^^^^ 56 57error[E0080]: evaluation of constant value failed 58 --> $SRC_DIR/core/src/num/f64.rs:LL:COL 59 | 60 = note: the evaluated program panicked at 'const-eval error: cannot use f64::to_bits on a NaN', $SRC_DIR/core/src/num/f64.rs:LL:COL 61 | 62note: inside `core::f64::<impl f64>::to_bits::ct_f64_to_u64` 63 --> $SRC_DIR/core/src/num/f64.rs:LL:COL 64note: inside `core::f64::<impl f64>::to_bits` 65 --> $SRC_DIR/core/src/num/f64.rs:LL:COL 66note: inside `f64::MASKED_NAN1` 67 --> $DIR/const-float-bits-reject-conv.rs:50:30 68 | 69LL | const MASKED_NAN1: u64 = f64::NAN.to_bits() ^ 0x000A_AAAA_AAAA_AAAA; 70 | ^^^^^^^^^^^^^^^^^^ 71 = note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info) 72 73error[E0080]: evaluation of constant value failed 74 --> $SRC_DIR/core/src/num/f64.rs:LL:COL 75 | 76 = note: the evaluated program panicked at 'const-eval error: cannot use f64::to_bits on a NaN', $SRC_DIR/core/src/num/f64.rs:LL:COL 77 | 78note: inside `core::f64::<impl f64>::to_bits::ct_f64_to_u64` 79 --> $SRC_DIR/core/src/num/f64.rs:LL:COL 80note: inside `core::f64::<impl f64>::to_bits` 81 --> $SRC_DIR/core/src/num/f64.rs:LL:COL 82note: inside `f64::MASKED_NAN2` 83 --> $DIR/const-float-bits-reject-conv.rs:52:30 84 | 85LL | const MASKED_NAN2: u64 = f64::NAN.to_bits() ^ 0x0005_5555_5555_5555; 86 | ^^^^^^^^^^^^^^^^^^ 87 = note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info) 88 89note: erroneous constant encountered 90 --> $DIR/const-float-bits-reject-conv.rs:57:34 91 | 92LL | const_assert!(f64::from_bits(MASKED_NAN1).is_nan()); 93 | ^^^^^^^^^^^ 94 95note: erroneous constant encountered 96 --> $DIR/const-float-bits-reject-conv.rs:58:34 97 | 98LL | const_assert!(f64::from_bits(MASKED_NAN1).is_nan()); 99 | ^^^^^^^^^^^ 100 101note: erroneous constant encountered 102 --> $DIR/const-float-bits-reject-conv.rs:61:34 103 | 104LL | const_assert!(f64::from_bits(MASKED_NAN1).to_bits(), MASKED_NAN1); 105 | ^^^^^^^^^^^ 106 107note: erroneous constant encountered 108 --> $DIR/const-float-bits-reject-conv.rs:62:34 109 | 110LL | const_assert!(f64::from_bits(MASKED_NAN2).to_bits(), MASKED_NAN2); 111 | ^^^^^^^^^^^ 112 113error: aborting due to 4 previous errors 114 115For more information about this error, try `rustc --explain E0080`.