We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a272ca2 commit 820f322Copy full SHA for 820f322
tests/pass/0weak_memory_consistency.rs
@@ -34,10 +34,12 @@ unsafe impl<T> Sync for EvilSend<T> {}
34
// multiple times
35
fn static_atomic(val: i32) -> &'static AtomicI32 {
36
let ret = Box::leak(Box::new(AtomicI32::new(val)));
37
+ ret.store(val, Relaxed); // work around https://github.com/rust-lang/miri/issues/2164
38
ret
39
}
40
fn static_atomic_bool(val: bool) -> &'static AtomicBool {
41
let ret = Box::leak(Box::new(AtomicBool::new(val)));
42
43
44
45
0 commit comments