cortex-m icon indicating copy to clipboard operation
cortex-m copied to clipboard

`static mut` transform produces warning with unsafe-op-in-unsafe-fn

Open ia0 opened this issue 9 months ago • 0 comments

#![warn(unsafe_op_in_unsafe_fn)]
#[entry]
fn main() -> ! {
    // The next line generates a warning while it shouldn't.
    static mut CLOCKS: MaybeUninit<Clocks> = MaybeUninit::new();
    // ...
}

I see in https://github.com/rust-embedded/cortex-m/issues/411#issuecomment-784449125 that maybe this static mut transform is going to be deprecated. Is that true?

ia0 avatar May 23 '24 14:05 ia0