Skip to content

Conversation

kurtjd
Copy link

@kurtjd kurtjd commented Sep 20, 2025

In edition 2024, #[warn(unsafe_op_in_unsafe_fn)] is enabled by default.

This PR adds the unsafe block around mutating DEVICE_PERIPHERALS in the generated Peripherals::steal() function. I had considered only adding this if the --edition=2024 flag was passed, but there is no harm in this being here even for earlier editions and is IMO clearer regardless. Though if folks disagree I can make that change.

@kurtjd kurtjd requested a review from a team as a code owner September 20, 2025 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant