Tracking Issue for #![feature(mixed_integer_ops)]
(original) (raw)
Feature gate: #![feature(mixed_integer_ops)]
Public API
// uX
is u8
, u16
, u32
, u64
,u128
, usize
impl uX {
pub const fn checked_add_signed(self, iX) -> Option;
pub const fn overflowing_add_signed(self, iX) -> (Self, bool);
pub const fn saturating_add_signed(self, iX) -> Self;
pub const fn wrapping_add_signed(self, iX) -> Self;
}
impl iX { pub const fn checked_add_unsigned(self, uX) -> Option; pub const fn overflowing_add_unsigned(self, uX) -> (Self, bool); pub const fn saturating_add_unsigned(self, uX) -> Self; pub const fn wrapping_add_unsigned(self, uX) -> Self;
pub const fn checked_sub_unsigned(self, uX) -> Option<Self>;
pub const fn overflowing_sub_unsigned(self, uX) -> (Self, bool);
pub const fn saturating_sub_unsigned(self, uX) -> Self;
pub const fn wrapping_sub_unsigned(self, uX) -> Self;
}
Steps / History
- Implementation: Add functions to add unsigned and signed integers #87601
- Final comment period (FCP)
- Stabilization PR: Stabilize #![feature(mixed_integer_ops)] #101555