nonzero_negation_ops: Set issue = "102443"
.
This commit is contained in:
parent
259bbfbc3d
commit
cdae82c5fc
@ -743,7 +743,7 @@ pub const fn unsigned_abs(self) -> $Uty {
|
||||
/// ```
|
||||
#[must_use]
|
||||
#[inline(always)]
|
||||
#[unstable(feature = "nonzero_negation_ops", issue = "none")]
|
||||
#[unstable(feature = "nonzero_negation_ops", issue = "102443")]
|
||||
pub const fn is_negative(self) -> bool {
|
||||
self.get().is_negative()
|
||||
}
|
||||
@ -769,7 +769,7 @@ pub const fn is_negative(self) -> bool {
|
||||
/// # }
|
||||
/// ```
|
||||
#[inline]
|
||||
#[unstable(feature = "nonzero_negation_ops", issue = "none")]
|
||||
#[unstable(feature = "nonzero_negation_ops", issue = "102443")]
|
||||
pub const fn checked_neg(self) -> Option<$Ty> {
|
||||
if let Some(result) = self.get().checked_neg() {
|
||||
// SAFETY: negation of nonzero cannot yield zero values.
|
||||
@ -802,7 +802,7 @@ pub const fn checked_neg(self) -> Option<$Ty> {
|
||||
/// # }
|
||||
/// ```
|
||||
#[inline]
|
||||
#[unstable(feature = "nonzero_negation_ops", issue = "none")]
|
||||
#[unstable(feature = "nonzero_negation_ops", issue = "102443")]
|
||||
pub const fn overflowing_neg(self) -> ($Ty, bool) {
|
||||
let (result, overflow) = self.get().overflowing_neg();
|
||||
// SAFETY: negation of nonzero cannot yield zero values.
|
||||
@ -836,7 +836,7 @@ pub const fn overflowing_neg(self) -> ($Ty, bool) {
|
||||
/// # }
|
||||
/// ```
|
||||
#[inline]
|
||||
#[unstable(feature = "nonzero_negation_ops", issue = "none")]
|
||||
#[unstable(feature = "nonzero_negation_ops", issue = "102443")]
|
||||
pub const fn saturating_neg(self) -> $Ty {
|
||||
if let Some(result) = self.checked_neg() {
|
||||
return result;
|
||||
@ -869,7 +869,7 @@ pub const fn saturating_neg(self) -> $Ty {
|
||||
/// # }
|
||||
/// ```
|
||||
#[inline]
|
||||
#[unstable(feature = "nonzero_negation_ops", issue = "none")]
|
||||
#[unstable(feature = "nonzero_negation_ops", issue = "102443")]
|
||||
pub const fn wrapping_neg(self) -> $Ty {
|
||||
let result = self.get().wrapping_neg();
|
||||
// SAFETY: negation of nonzero cannot yield zero values.
|
||||
|
Loading…
Reference in New Issue
Block a user