mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-19 06:15:45 +01:00
Fixed aliasing issue due to RacyCell implementation
This commit is contained in:
parent
b25d775771
commit
8065d741ac
10 changed files with 47 additions and 49 deletions
|
|
@ -57,9 +57,9 @@ pub fn codegen(ctxt: Context, needs_lt: &mut bool, app: &App) -> (TokenStream2,
|
|||
let expr = if is_declared {
|
||||
// If the local resources is already initialized, we only need to access its value and
|
||||
// not go through an `MaybeUninit`
|
||||
quote!(#mangled_name.get_mut_unchecked())
|
||||
quote!(&mut *#mangled_name.get_mut())
|
||||
} else {
|
||||
quote!(&mut *#mangled_name.get_mut_unchecked().as_mut_ptr())
|
||||
quote!(&mut *(&mut *#mangled_name.get_mut()).as_mut_ptr())
|
||||
};
|
||||
|
||||
values.push(quote!(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue