diff options
| author | Ian McIntyre <me@mciantyre.dev> | 2025-06-14 10:16:12 -0400 |
|---|---|---|
| committer | Ian McIntyre <me@mciantyre.dev> | 2025-09-16 07:47:23 -0400 |
| commit | 9728ac5305cfe259115858f0bc49985a0ad7cec4 (patch) | |
| tree | 16294fb24be29ebedd3099b063348c0520000db4 /board/src/teensy4.rs | |
| parent | ce97696bcd4515b5b2556163aa50c1b4723e7c0f (diff) | |
Adopt Rust 2024 edition
I'm considering this a breaking change. I'll try to introduce new
sections that rely on the user's `unsafe` keyword for linker placement.
Rust 2024 has different opinions on format, and clippy has new thoughts.
Let's adopt them.
Diffstat (limited to 'board/src/teensy4.rs')
| -rw-r--r-- | board/src/teensy4.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/board/src/teensy4.rs b/board/src/teensy4.rs index 2aaee82..cf1f734 100644 --- a/board/src/teensy4.rs +++ b/board/src/teensy4.rs @@ -38,15 +38,15 @@ pub fn prepare(timer_delay_microseconds: u32) -> Option<crate::Resources> { /// Dummy DCD section containing a single NOP command (for testing linker scripts). #[cfg(feature = "__dcd")] -#[link_section = ".dcd"] -#[no_mangle] +#[unsafe(link_section = ".dcd")] +#[unsafe(no_mangle)] #[used] pub static DEVICE_CONFIGURATION_DATA: [u8; 8] = [0xD2, 0x00, 0x08, 0x41, 0xC0, 0x00, 0x04, 0x00]; /// Ditto but incorrect size (not a multiple of 4 bytes). The linker script should catch this error /// and fail the build. #[cfg(feature = "__dcd_missize")] -#[link_section = ".dcd"] -#[no_mangle] +#[unsafe(link_section = ".dcd")] +#[unsafe(no_mangle)] #[used] pub static DEVICE_CONFIGURATION_DATA: [u8; 7] = [0xD2, 0x00, 0x08, 0x41, 0xC0, 0x00, 0x04]; |
