add work-around for #2164
This commit is contained in:
parent
a272ca2cf7
commit
820f322b86
1 changed files with 2 additions and 0 deletions
|
|
@ -34,10 +34,12 @@ unsafe impl<T> Sync for EvilSend<T> {}
|
|||
// multiple times
|
||||
fn static_atomic(val: i32) -> &'static AtomicI32 {
|
||||
let ret = Box::leak(Box::new(AtomicI32::new(val)));
|
||||
ret.store(val, Relaxed); // work around https://github.com/rust-lang/miri/issues/2164
|
||||
ret
|
||||
}
|
||||
fn static_atomic_bool(val: bool) -> &'static AtomicBool {
|
||||
let ret = Box::leak(Box::new(AtomicBool::new(val)));
|
||||
ret.store(val, Relaxed); // work around https://github.com/rust-lang/miri/issues/2164
|
||||
ret
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue