rust/library/core/src
Mara Bos e3c972e252
Rollup merge of #93208 - kellerkindt:wrapping_int_assign_impl, 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 #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 #55436 <https://github.com/rust-lang/rust/issues/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 1c0dc1810d #92356 for the `Saturating` type ``@dtolnay``  ``@Mark-Simulacrum``
2022-02-07 14:08:32 +00:00
..
alloc Fix a bunch of typos 2021-12-14 16:40:43 +01:00
array Add missing const stability attributes 2022-02-03 19:15:57 -05:00
char Rollup merge of #93392 - GKFX:char-docs, r=scottmcm 2022-01-31 06:58:32 +01:00
convert Rollup merge of #92382 - clarfonthey:const_convert, r=scottmcm 2022-01-15 02:25:14 +01:00
fmt Create core::fmt::ArgumentV1 with generics instead of fn pointer 2022-01-29 13:52:19 +00:00
future Rollup merge of #92887 - pietroalbini:pa-bootstrap-update, r=Mark-Simulacrum 2022-01-30 08:37:46 -08:00
hash change PhantomData type for BuildHasherDefault 2022-01-07 00:39:48 +01:00
iter Fix a typo from #92899 2022-01-28 01:35:33 +00:00
macros Fix invalid special casing of the unreachable! macro 2022-01-31 17:09:31 +01:00
mem Add MaybeUninit::as_bytes 2022-01-19 21:27:29 +00:00
num Rollup merge of #93208 - kellerkindt:wrapping_int_assign_impl, r=m-ou-se 2022-02-07 14:08:32 +00:00
ops Add a minimal working append_const_msg argument 2022-01-26 00:48:08 +11:00
panic Clarify safety of PanicInfo::can_unwind 2022-01-30 21:33:51 +01:00
prelude update cfg(bootstrap)s 2022-01-28 15:01:07 +01:00
ptr Make NonNull::new const 2022-01-23 23:04:39 +09:00
slice Auto merge of #86988 - thomcc:chunky-splitz-says-no-checking, r=the8472 2022-02-01 10:11:59 +00:00
str Fix comment grammar for do_count_chars 2022-02-05 11:17:10 -08:00
stream Remove P: Unpin bound on impl Stream for Pin 2021-12-17 11:14:02 +08:00
sync Add rustc_diagnostic_item attribute to AtomicBool 2022-01-13 23:32:49 +01:00
task Implement data and vtable getters for RawWaker 2021-12-17 04:30:13 +08:00
unicode Regenerate tables for Unicode 14.0.0 2021-10-06 17:49:33 -07:00
any.rs Reverts #92135 because perf regression 2021-12-26 16:02:33 +03:00
ascii.rs Add #[must_use] to remaining core functions 2021-10-30 18:21:29 -04:00
bool.rs Constify bool::then{,_some} 2021-12-15 00:11:23 +08:00
borrow.rs Make Borrow and BorrowMut impls const 2021-12-04 21:57:39 +09:00
cell.rs Add missing const stability attributes 2022-02-03 19:15:57 -05:00
clone.rs Update Copy/Clone documentation WRT arrays 2021-11-08 13:11:59 -05:00
cmp.rs Edit docs introduction for std::cmp::PartialOrd 2022-01-28 00:46:04 -06:00
default.rs Add #[must_use] to remaining core functions 2021-10-30 18:21:29 -04:00
ffi.rs Use target_family = "wasm" 2021-11-10 08:35:42 -08:00
hint.rs Add is_riscv_feature_detected!; modify impl of hint::spin_loop 2022-01-05 15:44:52 +08:00
internal_macros.rs Added docs to internal_macro const 2021-10-22 10:07:35 +13:00
intrinsics.rs Document about some behaviors of const_(de)allocate and add some tests. 2022-01-29 19:13:23 +09:00
lazy.rs Use UnsafeCell::get_mut() in core::lazy::OnceCell::get_mut() 2021-12-30 05:04:44 +02:00
lib.rs Rollup merge of #92887 - pietroalbini:pa-bootstrap-update, r=Mark-Simulacrum 2022-01-30 08:37:46 -08:00
marker.rs Update Copy/Clone documentation WRT arrays 2021-11-08 13:11:59 -05:00
option.rs Fix is_some_with tests. 2022-01-19 00:12:35 +01:00
panic.rs Fix invalid special casing of the unreachable! macro 2022-01-31 17:09:31 +01:00
panicking.rs Take in account the unreachable! macro in the non_fmt_panic lint 2022-01-31 17:09:31 +01:00
pin.rs Add #[must_use] to remaining core functions 2021-10-30 18:21:29 -04:00
primitive.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
primitive_docs.rs Fix annotation of code blocks 2022-02-01 21:44:53 +00:00
result.rs Fix is_some_with tests. 2022-01-19 00:12:35 +01:00
time.rs Improve Duration::try_from_secs_f32/64 accuracy by directly processing exponent and mantissa 2022-01-26 18:14:25 +03:00
tuple.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
unit.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00