Remove use of #[rustc_deprecated]
This commit is contained in:
parent
8ff5e3cf99
commit
4fbe73e0b7
77 changed files with 274 additions and 356 deletions
|
@ -513,15 +513,15 @@ impl f64 {
|
|||
#[must_use = "method returns a new number and does not mutate the original value"]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[inline]
|
||||
#[rustc_deprecated(
|
||||
#[deprecated(
|
||||
since = "1.10.0",
|
||||
reason = "you probably meant `(self - other).abs()`: \
|
||||
this operation is `(self - other).max(0.0)` \
|
||||
except that `abs_sub` also propagates NaNs (also \
|
||||
known as `fdim` in C). If you truly need the positive \
|
||||
difference, consider using that expression or the C function \
|
||||
`fdim`, depending on how you wish to handle NaN (please consider \
|
||||
filing an issue describing your use-case too)."
|
||||
note = "you probably meant `(self - other).abs()`: \
|
||||
this operation is `(self - other).max(0.0)` \
|
||||
except that `abs_sub` also propagates NaNs (also \
|
||||
known as `fdim` in C). If you truly need the positive \
|
||||
difference, consider using that expression or the C function \
|
||||
`fdim`, depending on how you wish to handle NaN (please consider \
|
||||
filing an issue describing your use-case too)."
|
||||
)]
|
||||
pub fn abs_sub(self, other: f64) -> f64 {
|
||||
unsafe { cmath::fdim(self, other) }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue