diff options
| author | Ralf Jung <post@ralfj.de> | 2024-12-06 19:54:22 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2024-12-06 19:54:22 +0100 |
| commit | 016fb485fa9dd1a177b53bb436a280e387e9022b (patch) | |
| tree | 87953ccd990740756c1b49628fe6cae5e7e18832 | |
| parent | 644faf4c93e401096abd97b639a2f827ba70c17c (diff) | |
| download | rust-016fb485fa9dd1a177b53bb436a280e387e9022b.tar.gz rust-016fb485fa9dd1a177b53bb436a280e387e9022b.zip | |
remove a no-longer-needed work-around
| -rw-r--r-- | src/tools/miri/tests/pass/0weak_memory_consistency.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/tools/miri/tests/pass/0weak_memory_consistency.rs b/src/tools/miri/tests/pass/0weak_memory_consistency.rs index 27581be8182..c0d0287855b 100644 --- a/src/tools/miri/tests/pass/0weak_memory_consistency.rs +++ b/src/tools/miri/tests/pass/0weak_memory_consistency.rs @@ -34,14 +34,10 @@ unsafe impl<T> Sync for EvilSend<T> {} // We can't create static items because we need to run each test // 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 + Box::leak(Box::new(AtomicI32::new(val))) } 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 + Box::leak(Box::new(AtomicBool::new(val))) } // Spins until it acquires a pre-determined value. |
