nonzero_negation_ops: Set issue = "102443"
.
This commit is contained in:
parent
259bbfbc3d
commit
cdae82c5fc
1 changed files with 5 additions and 5 deletions
|
@ -743,7 +743,7 @@ macro_rules! nonzero_signed_operations {
|
||||||
/// ```
|
/// ```
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
#[unstable(feature = "nonzero_negation_ops", issue = "none")]
|
#[unstable(feature = "nonzero_negation_ops", issue = "102443")]
|
||||||
pub const fn is_negative(self) -> bool {
|
pub const fn is_negative(self) -> bool {
|
||||||
self.get().is_negative()
|
self.get().is_negative()
|
||||||
}
|
}
|
||||||
|
@ -769,7 +769,7 @@ macro_rules! nonzero_signed_operations {
|
||||||
/// # }
|
/// # }
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[unstable(feature = "nonzero_negation_ops", issue = "none")]
|
#[unstable(feature = "nonzero_negation_ops", issue = "102443")]
|
||||||
pub const fn checked_neg(self) -> Option<$Ty> {
|
pub const fn checked_neg(self) -> Option<$Ty> {
|
||||||
if let Some(result) = self.get().checked_neg() {
|
if let Some(result) = self.get().checked_neg() {
|
||||||
// SAFETY: negation of nonzero cannot yield zero values.
|
// SAFETY: negation of nonzero cannot yield zero values.
|
||||||
|
@ -802,7 +802,7 @@ macro_rules! nonzero_signed_operations {
|
||||||
/// # }
|
/// # }
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[unstable(feature = "nonzero_negation_ops", issue = "none")]
|
#[unstable(feature = "nonzero_negation_ops", issue = "102443")]
|
||||||
pub const fn overflowing_neg(self) -> ($Ty, bool) {
|
pub const fn overflowing_neg(self) -> ($Ty, bool) {
|
||||||
let (result, overflow) = self.get().overflowing_neg();
|
let (result, overflow) = self.get().overflowing_neg();
|
||||||
// SAFETY: negation of nonzero cannot yield zero values.
|
// SAFETY: negation of nonzero cannot yield zero values.
|
||||||
|
@ -836,7 +836,7 @@ macro_rules! nonzero_signed_operations {
|
||||||
/// # }
|
/// # }
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[unstable(feature = "nonzero_negation_ops", issue = "none")]
|
#[unstable(feature = "nonzero_negation_ops", issue = "102443")]
|
||||||
pub const fn saturating_neg(self) -> $Ty {
|
pub const fn saturating_neg(self) -> $Ty {
|
||||||
if let Some(result) = self.checked_neg() {
|
if let Some(result) = self.checked_neg() {
|
||||||
return result;
|
return result;
|
||||||
|
@ -869,7 +869,7 @@ macro_rules! nonzero_signed_operations {
|
||||||
/// # }
|
/// # }
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[unstable(feature = "nonzero_negation_ops", issue = "none")]
|
#[unstable(feature = "nonzero_negation_ops", issue = "102443")]
|
||||||
pub const fn wrapping_neg(self) -> $Ty {
|
pub const fn wrapping_neg(self) -> $Ty {
|
||||||
let result = self.get().wrapping_neg();
|
let result = self.get().wrapping_neg();
|
||||||
// SAFETY: negation of nonzero cannot yield zero values.
|
// SAFETY: negation of nonzero cannot yield zero values.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue