From 9728ac5305cfe259115858f0bc49985a0ad7cec4 Mon Sep 17 00:00:00 2001 From: Ian McIntyre Date: Sat, 14 Jun 2025 10:16:12 -0400 Subject: Adopt Rust 2024 edition I'm considering this a breaking change. I'll try to introduce new sections that rely on the user's `unsafe` keyword for linker placement. Rust 2024 has different opinions on format, and clippy has new thoughts. Let's adopt them. --- src/target.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/target.rs') diff --git a/src/target.rs b/src/target.rs index 98072e0..d0e2223 100644 --- a/src/target.rs +++ b/src/target.rs @@ -135,14 +135,8 @@ __pre_init: /// The returned pointer is guaranteed to be 4-byte aligned. #[inline] pub fn heap_end() -> *mut u32 { - extern "C" { + unsafe extern "C" { static mut __eheap: c_void; } - - // It used to be unsafe. Keeping it unsafe is backwards - // compatible. - #[allow(unused_unsafe)] - unsafe { - core::ptr::addr_of_mut!(__eheap) as _ - } + &raw mut __eheap as _ } -- cgit v1.2.3