Skip to content

Commit 9ea27f9

Browse files
author
Takuma YOSHIOKA
committed
Restore and mark NotNaN and FloatIsNaN as deprecated
For compatilibity reason, old names should be available for a while.
1 parent 4c52f74 commit 9ea27f9

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/lib.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,16 @@ use std::mem;
1717
use unreachable::unreachable;
1818
use num_traits::Float;
1919

20+
/// A wrapper around Floats providing an implementation of Ord and Hash.
21+
///
22+
/// A NaN value cannot be stored in this type.
23+
#[deprecated(since = "0.6.0", note = "renamed to `NotNan`")]
24+
pub type NotNaN<T> = NotNan<T>;
25+
26+
/// An error indicating an attempt to construct NotNan from a NaN
27+
#[deprecated(since = "0.6.0", note = "renamed to `FloatIsNan`")]
28+
pub type FloatIsNaN = FloatIsNan;
29+
2030
// masks for the parts of the IEEE 754 float
2131
const SIGN_MASK: u64 = 0x8000000000000000u64;
2232
const EXP_MASK: u64 = 0x7ff0000000000000u64;

0 commit comments

Comments
 (0)