Feature gate: #![feature(wrapping_int_assign_impl)]
This is a tracking issue for adding basic integer operations to the Wrapping type:
let mut value = Wrapping(2u8);
value += 3u8;
value -= 1u8;
value *= 2u8;
value /= 2u8;
value %= 2u8;
value ^= 255u8;
value |= 123u8;
value &= 2u8;
As well as
let mut value = Wrapping(2u8);
let _: Wrapping<u8> = value + 3u8;
let _: Wrapping<u8> = value - 1u8;
let _: Wrapping<u8> = value * 2u8;
let _: Wrapping<u8> = value / 2u8;
let _: Wrapping<u8> = value % 2u8;
let _: Wrapping<u8> = value ^ 255u8;
let _: Wrapping<u8> = value | 123u8;
let _: Wrapping<u8> = value & 2u8;
Steps / History
Unresolved Questions
This is analog to the implementation for the Saturating type here #92354
Feature gate:
#![feature(wrapping_int_assign_impl)]This is a tracking issue for adding basic integer operations to the
Wrappingtype:As well as
Steps / History
core::ops::*<T>onSaturating<T>/Wrapping<T>type #91586wrapping_int_assign_implImpl {Add,Sub,Mul,Div,Rem,BitXor,BitOr,BitAnd}Assign<$t> for Wrapping<$t> for rust 1.60.0 #93208Unresolved Questions
This is analog to the implementation for the
Saturatingtype here #92354