From 50017b96f04ff095e143fd19bb8487e86adae28f Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Wed, 3 Nov 2021 08:27:05 +0100 Subject: [PATCH] Fixed aliasing in lock impl --- macros/src/codegen/shared_resources.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macros/src/codegen/shared_resources.rs b/macros/src/codegen/shared_resources.rs index aa50dccb6e..b27c827c23 100644 --- a/macros/src/codegen/shared_resources.rs +++ b/macros/src/codegen/shared_resources.rs @@ -69,7 +69,7 @@ pub fn codegen( let ptr = quote!( #(#cfgs)* - (&mut *#mangled_name.get_mut()).as_mut_ptr() + #mangled_name.get_mut() as *mut _ ); let ceiling = match analysis.ownerships.get(name) {