forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#93208 - kellerkindt:wrapping_int_assign_imp…
…l, r=m-ou-se Impl {Add,Sub,Mul,Div,Rem,BitXor,BitOr,BitAnd}Assign<$t> for Wrapping<$t> for rust 1.60.0 Tracking issue rust-lang#93204 This is about adding basic integer operations to the `Wrapping` type: ```rust let mut value = Wrapping(2u8); value += 3u8; value -= 1u8; value *= 2u8; value /= 2u8; value %= 2u8; value ^= 255u8; value |= 123u8; value &= 2u8; ``` Because this adds stable impls on a stable type, it runs into the following issue if an `#[unstable(...)]` attribute is used: ``` an `#[unstable]` annotation here has no effect note: see issue rust-lang#55436 <rust-lang#55436> for more information ``` This means - if I understood this correctly - the new impls have to be stabilized instantly. Which in turn means, this PR has to kick of an FCP on the tracking issue as well? This impl is analog to 1c0dc18 rust-lang#92356 for the `Saturating` type `@dtolnay` `@Mark-Simulacrum`
- Loading branch information
Showing
1 changed file
with
80 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters