rust-embedded / embedonomicon

How to bootstrap support for a no_std target
https://docs.rust-embedded.org/embedonomicon/
Apache License 2.0
206 stars 33 forks source link

Make statics const #91

Closed diondokter closed 5 months ago

diondokter commented 5 months ago

With recent compiler versions we get warnings for this code where it suggests using addr_of! to avoid taking the intermediate reference to a static mut variable.

However, there's no clear reason why these even need to be mut. Embassy-boot doesn't use mut. So let's change it so people copying this don't get that same unhelpful warning.

diondokter commented 5 months ago

Ok, so my changes don't work, but also this file appears to be full of UB... So I'm gonna close this PR for now