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

@@ -14,7 +14,7 @@ use {defmt_rtt as _, panic_probe as _};
// Program metadata for `picotool info`.
// This isn't needed, but it's recomended to have these minimal entries.
#[link_section = ".bi_entries"]
#[unsafe(link_section = ".bi_entries")]
#[used]
pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [
embassy_rp::binary_info::rp_program_name!(c"Blinky Example"),

View File

@@ -18,7 +18,7 @@ use {defmt_rtt as _, panic_probe as _};
// Program metadata for `picotool info`.
// This isn't needed, but it's recommended to have these minimal entries.
#[link_section = ".bi_entries"]
#[unsafe(link_section = ".bi_entries")]
#[used]
pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [
embassy_rp::binary_info::rp_program_name!(c"Blinky Example"),

View File

@@ -18,7 +18,7 @@ use {defmt_rtt as _, panic_probe as _};
// Program metadata for `picotool info`.
// This isn't needed, but it's recomended to have these minimal entries.
#[link_section = ".bi_entries"]
#[unsafe(link_section = ".bi_entries")]
#[used]
pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [
embassy_rp::binary_info::rp_program_name!(c"Blinky Example"),

View File

@@ -16,7 +16,7 @@ use pio::{Common, Config, FifoJoin, Instance, InterruptHandler, Pio, PioPin, Shi
use {defmt_rtt as _, panic_probe as _};
// Program metadata for `picotool info`
#[link_section = ".bi_entries"]
#[unsafe(link_section = ".bi_entries")]
#[used]
pub static PICOTOOL_ENTRIES: [embassy_rp::binary_info::EntryAddr; 4] = [
embassy_rp::binary_info::rp_program_name!(c"example_pio_rotary_encoder_rxf"),