Skip to content

Commit

Permalink
Fix warning with rust 1.82.0
Browse files Browse the repository at this point in the history
Since rust 1.82.0, addr_of is no longer unsafe:
rust-lang/rust#125834

Just removing the unsafe statement would break builds with older
versions of rust. Instead, allow the unused_unsafe lint.
  • Loading branch information
jannic committed Oct 17, 2024
1 parent 63af864 commit 8d5d9b7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions rp-binary-info/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ extern "C" {
#[link_section = ".boot_info"]
#[cfg(feature = "binary-info")]
#[used]
#[allow(unused_unsafe)] // addr_of! is safe since rust 1.82.0
pub static PICOTOOL_HEADER: Header = unsafe {
Header::new(
core::ptr::addr_of!(__bi_entries_start),
Expand Down

0 comments on commit 8d5d9b7

Please sign in to comment.