From 86ffa24e8ec551fc33a7f31124dbbe9dca8f6825 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Thu, 27 Mar 2025 15:05:58 +0100 Subject: [PATCH 1/3] Update to Rust 2024 edition --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 73b2b877..77c97e23 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "blog_os" version = "0.1.0" authors = ["Philipp Oppermann "] -edition = "2018" +edition = "2024" [dependencies] From 430e2143f8723cf8929a57e56cf4ebf04b7c875f Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Thu, 27 Mar 2025 15:06:17 +0100 Subject: [PATCH 2/3] Fix: `no_mangle` is an unsafe attribute since Rust 2024 --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 9ae7cc3d..c8d19676 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,7 +3,7 @@ use core::panic::PanicInfo; -#[no_mangle] +#[unsafe(no_mangle)] pub extern "C" fn _start() -> ! { loop {} } From e4b3ed6d42d6f77d6894e65dd3edd4b378efe512 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Thu, 27 Mar 2025 15:13:34 +0100 Subject: [PATCH 3/3] Fix: `no_mangle` is an unsafe attribute since Rust 2024 --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 052452f9..fd3630da 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -57,7 +57,7 @@ pub fn exit_qemu(exit_code: QemuExitCode) { /// Entry point for `cargo xtest` #[cfg(test)] -#[no_mangle] +#[unsafe(no_mangle)] pub extern "C" fn _start() -> ! { test_main(); loop {}