diff options
| author | Ulf Lilleengen <[email protected]> | 2025-05-09 13:05:23 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-05-09 13:05:23 +0200 |
| commit | 64a2b9b2a36adbc26117b8e76ae2b178a5e3eb9f (patch) | |
| tree | 22fba36ec13d257189701e4a053b930032480cb3 /examples/boot/application | |
| parent | aa8703360e913ae39cf8f24aae4a68158b7d6208 (diff) | |
| parent | f5ddb9358f841d1a1e3a996eb30d7d9fd5d44d38 (diff) | |
Merge pull request #4170 from yutannihilation/chore/fix-unsafe-attribute-rust2024
chore: Wrap `link_section` attribute in example code with `unsafe()` for compatibility with Rust 2024 edition
Diffstat (limited to 'examples/boot/application')
| -rw-r--r-- | examples/boot/application/stm32wl/src/bin/a.rs | 2 | ||||
| -rw-r--r-- | examples/boot/application/stm32wl/src/bin/b.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/examples/boot/application/stm32wl/src/bin/a.rs b/examples/boot/application/stm32wl/src/bin/a.rs index 127de0237..e4526927f 100644 --- a/examples/boot/application/stm32wl/src/bin/a.rs +++ b/examples/boot/application/stm32wl/src/bin/a.rs | |||
| @@ -20,7 +20,7 @@ static APP_B: &[u8] = &[0, 1, 2, 3]; | |||
| 20 | #[cfg(not(feature = "skip-include"))] | 20 | #[cfg(not(feature = "skip-include"))] |
| 21 | static APP_B: &[u8] = include_bytes!("../../b.bin"); | 21 | static APP_B: &[u8] = include_bytes!("../../b.bin"); |
| 22 | 22 | ||
| 23 | #[link_section = ".shared_data"] | 23 | #[unsafe(link_section = ".shared_data")] |
| 24 | static SHARED_DATA: MaybeUninit<SharedData> = MaybeUninit::uninit(); | 24 | static SHARED_DATA: MaybeUninit<SharedData> = MaybeUninit::uninit(); |
| 25 | 25 | ||
| 26 | #[embassy_executor::main] | 26 | #[embassy_executor::main] |
diff --git a/examples/boot/application/stm32wl/src/bin/b.rs b/examples/boot/application/stm32wl/src/bin/b.rs index 768dadf8b..6016a9555 100644 --- a/examples/boot/application/stm32wl/src/bin/b.rs +++ b/examples/boot/application/stm32wl/src/bin/b.rs | |||
| @@ -11,7 +11,7 @@ use embassy_stm32::SharedData; | |||
| 11 | use embassy_time::Timer; | 11 | use embassy_time::Timer; |
| 12 | use panic_reset as _; | 12 | use panic_reset as _; |
| 13 | 13 | ||
| 14 | #[link_section = ".shared_data"] | 14 | #[unsafe(link_section = ".shared_data")] |
| 15 | static SHARED_DATA: MaybeUninit<SharedData> = MaybeUninit::uninit(); | 15 | static SHARED_DATA: MaybeUninit<SharedData> = MaybeUninit::uninit(); |
| 16 | 16 | ||
| 17 | #[embassy_executor::main] | 17 | #[embassy_executor::main] |
