rust/library/core
Matthias Krüger 0871a38adf
Rollup merge of #92671 - WaffleLapkin:atomic_from_mut_unique_ref, r=m-ou-se
Make `Atomic*::from_mut` return `&mut Atomic*`

```rust
impl Atomic* {
    pub fn from_mut(v: &mut bool) -> &mut Self;
    //                               ^^^^---- previously was just a &
}
```

This PR makes `from_mut` atomic methods tracked in #76314 return unique references to atomic types, instead of shared ones. This makes `from_mut` and `get_mut` inverses of each other, allowing to undo either of them by the other.

r? `@RalfJung`
(as Ralf was [concerned](https://github.com/rust-lang/rust/issues/76314#issuecomment-955062593) about this)
2022-01-09 13:38:33 +01:00
..
benches Auto merge of #88788 - falk-hueffner:speedup-int-log10-branchless, r=joshtriplett 2021-10-12 03:18:54 +00:00
primitive_docs Add primitive documentation to libcore 2021-09-12 02:23:08 +00:00
src Rollup merge of #92671 - WaffleLapkin:atomic_from_mut_unique_ref, r=m-ou-se 2022-01-09 13:38:33 +01:00
tests Auto merge of #92226 - woppopo:const_black_box, r=joshtriplett 2021-12-24 10:02:54 +00:00
Cargo.toml Switch all libraries to the 2021 edition 2021-12-23 19:03:47 +08:00