You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I's going through the examples for shared references here and found that replacing let ptr4 = sref3 as *mut i32; with let ptr4 = sref3 as *const i32 as *mut i32; doesn't work even without miri on
error: assigning to `&T` is undefined behavior, consider using an `UnsafeCell`
I'm not sure if I just messed-up something locally or it's a new stable safety feature.
The text was updated successfully, but these errors were encountered:
skorobogatydmitry
changed the title
sref3 as *const i32 as *mut i32; in chapter 6.6 doesn't work for nightlysref3 as *const i32 as *mut i32; in chapter 6.6 doesn't work for stable
Jan 4, 2025
I's going through the examples for shared references here and found that replacing
let ptr4 = sref3 as *mut i32;
withlet ptr4 = sref3 as *const i32 as *mut i32;
doesn't work even without miri oncargo run
gives the following:I'm not sure if I just messed-up something locally or it's a new stable safety feature.
The text was updated successfully, but these errors were encountered: