From 21bd55c30d69f21b2fa2bd6d8d69f5406d876d27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Sun, 21 Apr 2019 12:58:48 +0200 Subject: [PATCH] Make the slice::from_raw_parts call safe --- lib/runtime-core/src/memory/atomic.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/runtime-core/src/memory/atomic.rs b/lib/runtime-core/src/memory/atomic.rs index f4ed3d3d0..f14415def 100644 --- a/lib/runtime-core/src/memory/atomic.rs +++ b/lib/runtime-core/src/memory/atomic.rs @@ -52,6 +52,7 @@ macro_rules! intcast { } intcast! { u8 i8 u16 i16 u32 i32 u64 i64 } +#[repr(transparent)] pub struct Atomic { v: UnsafeCell>, }