about summary refs log tree commit diff
path: root/src/test/codegen/stack-alloc-string-slice.rs
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2014-02-17 01:37:26 -0800
committerAlex Crichton <alex@alexcrichton.com>2014-03-20 09:44:29 -0700
commitf3fef9a6493fdd6322ff1b879f050750805a53a2 (patch)
tree36fa29d6025bbfa6e1d0029018fa4108dc7b72f4 /src/test/codegen/stack-alloc-string-slice.rs
parentc01e2f05a3ef27e464d1f0057ddabcde6ffde70c (diff)
downloadrust-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