about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-01-09 13:38:33 +0100
committerGitHub <noreply@github.com>2022-01-09 13:38:33 +0100
commit0871a38adf22982ba7ed666867a0bfc3c36125e0 (patch)
treef10b2039c1770ec91c47a5a34b955dff9fb49050 /compiler/rustc_codegen_llvm/src
parent295ef3a3367dfbb1eef6ea4d259e546053796f6f (diff)
parent2b03ed19f665fa599f3710e4ecd6ca28c945e664 (diff)
downloadrust-0871a38adf22982ba7ed666867a0bfc3c36125e0.tar.gz
rust-0871a38adf22982ba7ed666867a0bfc3c36125e0.zip
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)
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions