Skip to content

Commit 8d5d9b7

Browse files
committed
Fix warning with rust 1.82.0
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.
1 parent 63af864 commit 8d5d9b7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

rp-binary-info/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ extern "C" {
106106
#[link_section = ".boot_info"]
107107
#[cfg(feature = "binary-info")]
108108
#[used]
109+
#[allow(unused_unsafe)] // addr_of! is safe since rust 1.82.0
109110
pub static PICOTOOL_HEADER: Header = unsafe {
110111
Header::new(
111112
core::ptr::addr_of!(__bi_entries_start),

0 commit comments

Comments
 (0)