- 
                Notifications
    
You must be signed in to change notification settings  - Fork 13.9k
 
Closed
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Description
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
-  Proposal for this implementation:  Tracking issue for 
core::ops::*<T>onSaturating<T>/Wrapping<T>type #91586 -  Implementation of 
wrapping_int_assign_implImpl {Add,Sub,Mul,Div,Rem,BitXor,BitOr,BitAnd}Assign<$t> for Wrapping<$t> for rust 1.60.0 #93208 - Final comment period (FCP)
 - Stabilization PR
 
Unresolved Questions
- Is this reasonable?
 
This is analog to the implementation for the Saturating type here #92354
Metadata
Metadata
Assignees
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.