Added tracking issue numbers for int_abs_diff.
This commit is contained in:
@@ -2244,7 +2244,7 @@ macro_rules! int_impl {
|
|||||||
#[doc = concat!("assert_eq!((-100", stringify!($SelfT), ").abs_diff(-120), 20", stringify!($UnsignedT), ");")]
|
#[doc = concat!("assert_eq!((-100", stringify!($SelfT), ").abs_diff(-120), 20", stringify!($UnsignedT), ");")]
|
||||||
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MIN.abs_diff(", stringify!($SelfT), "::MAX), ", stringify!($UnsignedT), "::MAX);")]
|
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MIN.abs_diff(", stringify!($SelfT), "::MAX), ", stringify!($UnsignedT), "::MAX);")]
|
||||||
/// ```
|
/// ```
|
||||||
#[unstable(feature = "int_abs_diff", issue = "none")]
|
#[unstable(feature = "int_abs_diff", issue = "89492")]
|
||||||
#[inline]
|
#[inline]
|
||||||
pub const fn abs_diff(self, other: Self) -> $UnsignedT {
|
pub const fn abs_diff(self, other: Self) -> $UnsignedT {
|
||||||
if self < other {
|
if self < other {
|
||||||
|
|||||||
@@ -1501,7 +1501,7 @@ macro_rules! uint_impl {
|
|||||||
#[doc = concat!("assert_eq!(100", stringify!($SelfT), ".abs_diff(80), 20", stringify!($SelfT), ");")]
|
#[doc = concat!("assert_eq!(100", stringify!($SelfT), ".abs_diff(80), 20", stringify!($SelfT), ");")]
|
||||||
#[doc = concat!("assert_eq!(100", stringify!($SelfT), ".abs_diff(110), 10", stringify!($SelfT), ");")]
|
#[doc = concat!("assert_eq!(100", stringify!($SelfT), ".abs_diff(110), 10", stringify!($SelfT), ");")]
|
||||||
/// ```
|
/// ```
|
||||||
#[unstable(feature = "int_abs_diff", issue = "none")]
|
#[unstable(feature = "int_abs_diff", issue = "89492")]
|
||||||
#[inline]
|
#[inline]
|
||||||
pub const fn abs_diff(self, other: Self) -> Self {
|
pub const fn abs_diff(self, other: Self) -> Self {
|
||||||
if mem::size_of::<Self>() == 1 {
|
if mem::size_of::<Self>() == 1 {
|
||||||
|
|||||||
Reference in New Issue
Block a user