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
This commit is contained in:
Ulf Lilleengen
2025-05-09 13:05:23 +02:00
committed by GitHub
22 changed files with 26 additions and 26 deletions

View File

@@ -25,7 +25,7 @@ fn main() {
.write_all(
format!(
r##"
#[link_section = ".biv"]
#[unsafe(link_section = ".biv")]
#[used]
static BOOT_IMAGE_VERSION: u32 = 0x{:02x}{:02x}{:02x}00;
"##,

View File

@@ -6,15 +6,15 @@ use {defmt_rtt as _, panic_probe as _};
// auto-generated version information from Cargo.toml
include!(concat!(env!("OUT_DIR"), "/biv.rs"));
#[link_section = ".otfad"]
#[unsafe(link_section = ".otfad")]
#[used]
static OTFAD: [u8; 256] = [0; 256];
#[rustfmt::skip]
#[link_section = ".fcb"]
#[unsafe(link_section = ".fcb")]
#[used]
static FCB: FlexSPIFlashConfigurationBlock = FlexSPIFlashConfigurationBlock::build();
#[link_section = ".keystore"]
#[unsafe(link_section = ".keystore")]
#[used]
static KEYSTORE: [u8; 2048] = [0; 2048];