From 1d0aa175319387fed046837ba8f69e5f8e4668dd Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Thu, 27 Mar 2025 15:50:07 +0100 Subject: [PATCH] Update tests to make `no_mangle` attribute `unsafe` Required since Rust 2024 edition --- tests/basic_boot.rs | 2 +- tests/should_panic.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/basic_boot.rs b/tests/basic_boot.rs index c409647e..4171eb7a 100644 --- a/tests/basic_boot.rs +++ b/tests/basic_boot.rs @@ -7,7 +7,7 @@ use blog_os::println; use core::panic::PanicInfo; -#[no_mangle] // don't mangle the name of this function +#[unsafe(no_mangle)] // don't mangle the name of this function pub extern "C" fn _start() -> ! { test_main(); diff --git a/tests/should_panic.rs b/tests/should_panic.rs index 375f51c0..f735259d 100644 --- a/tests/should_panic.rs +++ b/tests/should_panic.rs @@ -1,10 +1,10 @@ #![no_std] #![no_main] -use blog_os::{exit_qemu, serial_print, serial_println, QemuExitCode}; +use blog_os::{QemuExitCode, exit_qemu, serial_print, serial_println}; use core::panic::PanicInfo; -#[no_mangle] +#[unsafe(no_mangle)] pub extern "C" fn _start() -> ! { should_fail(); serial_println!("[test did not panic]");