diff options
| author | Brian Anderson <banderson@mozilla.com> | 2014-02-17 01:37:26 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-03-20 09:44:29 -0700 |
| commit | f3fef9a6493fdd6322ff1b879f050750805a53a2 (patch) | |
| tree | 36fa29d6025bbfa6e1d0029018fa4108dc7b72f4 /src/test/codegen/stack-alloc-string-slice.rs | |
| parent | c01e2f05a3ef27e464d1f0057ddabcde6ffde70c (diff) | |
| download | rust-f3fef9a6493fdd6322ff1b879f050750805a53a2.tar.gz rust-f3fef9a6493fdd6322ff1b879f050750805a53a2.zip | |
std: Make atomics immutable. #11583
In Rust, the strongest guarantee that `&mut` provides is that the memory pointed to is *not aliased*, whereas `&`'s guarantees are much weaker: that the value can be aliased, and may be mutated under proper precautions (interior mutability). Our atomics though use `&mut` for mutation even while creating multiple aliases, so this changes them to use 'interior mutability', mutating through immutable references.
Diffstat (limited to 'src/test/codegen/stack-alloc-string-slice.rs')
0 files changed, 0 insertions, 0 deletions
