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/mimxrt6 | |
| 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/mimxrt6')
| -rw-r--r-- | examples/mimxrt6/build.rs | 2 | ||||
| -rw-r--r-- | examples/mimxrt6/src/lib.rs | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/examples/mimxrt6/build.rs b/examples/mimxrt6/build.rs index 9c0ed3213..56010dfd6 100644 --- a/examples/mimxrt6/build.rs +++ b/examples/mimxrt6/build.rs | |||
| @@ -25,7 +25,7 @@ fn main() { | |||
| 25 | .write_all( | 25 | .write_all( |
| 26 | format!( | 26 | format!( |
| 27 | r##" | 27 | r##" |
| 28 | #[link_section = ".biv"] | 28 | #[unsafe(link_section = ".biv")] |
| 29 | #[used] | 29 | #[used] |
| 30 | static BOOT_IMAGE_VERSION: u32 = 0x{:02x}{:02x}{:02x}00; | 30 | static BOOT_IMAGE_VERSION: u32 = 0x{:02x}{:02x}{:02x}00; |
| 31 | "##, | 31 | "##, |
diff --git a/examples/mimxrt6/src/lib.rs b/examples/mimxrt6/src/lib.rs index da6e14427..3c3ea1981 100644 --- a/examples/mimxrt6/src/lib.rs +++ b/examples/mimxrt6/src/lib.rs | |||
| @@ -6,15 +6,15 @@ use {defmt_rtt as _, panic_probe as _}; | |||
| 6 | // auto-generated version information from Cargo.toml | 6 | // auto-generated version information from Cargo.toml |
| 7 | include!(concat!(env!("OUT_DIR"), "/biv.rs")); | 7 | include!(concat!(env!("OUT_DIR"), "/biv.rs")); |
| 8 | 8 | ||
| 9 | #[link_section = ".otfad"] | 9 | #[unsafe(link_section = ".otfad")] |
| 10 | #[used] | 10 | #[used] |
| 11 | static OTFAD: [u8; 256] = [0; 256]; | 11 | static OTFAD: [u8; 256] = [0; 256]; |
| 12 | 12 | ||
| 13 | #[rustfmt::skip] | 13 | #[rustfmt::skip] |
| 14 | #[link_section = ".fcb"] | 14 | #[unsafe(link_section = ".fcb")] |
| 15 | #[used] | 15 | #[used] |
| 16 | static FCB: FlexSPIFlashConfigurationBlock = FlexSPIFlashConfigurationBlock::build(); | 16 | static FCB: FlexSPIFlashConfigurationBlock = FlexSPIFlashConfigurationBlock::build(); |
| 17 | 17 | ||
| 18 | #[link_section = ".keystore"] | 18 | #[unsafe(link_section = ".keystore")] |
| 19 | #[used] | 19 | #[used] |
| 20 | static KEYSTORE: [u8; 2048] = [0; 2048]; | 20 | static KEYSTORE: [u8; 2048] = [0; 2048]; |
