From 8d5d9b74b828548a293a330f6ef84cff04cfb3e6 Mon Sep 17 00:00:00 2001 From: Jan Niehusmann Date: Thu, 17 Oct 2024 17:09:30 +0000 Subject: [PATCH] Fix warning with rust 1.82.0 Since rust 1.82.0, addr_of is no longer unsafe: https://github.com/rust-lang/rust/pull/125834 Just removing the unsafe statement would break builds with older versions of rust. Instead, allow the unused_unsafe lint. --- rp-binary-info/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/rp-binary-info/src/lib.rs b/rp-binary-info/src/lib.rs index a36f027a5..6d20a2483 100644 --- a/rp-binary-info/src/lib.rs +++ b/rp-binary-info/src/lib.rs @@ -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),