imxrt-rs / imxrt-hal

Rust for NXP i.MX RT
Apache License 2.0
133 stars 33 forks source link

Eagerly address select Rust 2024 edition changes #155

Closed mciantyre closed 5 months ago

mciantyre commented 5 months ago

The 2024 edition enables unsafe_op_in_unsafe_fn by default. This PR adds unsafe blocks and safety considerations throughout HAL and logging packages. There shouldn't be any functional changes.

Today's stable toolchain (1.77) also warns about the explicit references to static muts. I'm taking the simple approach to resolve this eventual hard error.

Tested on an 1170EVK using the rtic_logging example, with both backends and both frontends.