The no_mangle attribute is unsafe since Rust 2024

This commit is contained in:
Philipp Oppermann
2025-03-27 15:39:15 +01:00
parent 9345886d44
commit 9753695744
47 changed files with 149 additions and 149 deletions

View File

@@ -303,7 +303,7 @@ bootloader = { version = "0.9", features = ["map_physical_memory"]}
use bootloader::BootInfo;
#[no_mangle]
#[unsafe(no_mangle)]
pub extern "C" fn _start(boot_info: &'static BootInfo) -> ! { // 新しい引数
[]
}

View File

@@ -301,7 +301,7 @@ The bootloader passes the `BootInfo` struct to our kernel in the form of a `&'st
use bootloader::BootInfo;
#[no_mangle]
#[unsafe(no_mangle)]
pub extern "C" fn _start(boot_info: &'static BootInfo) -> ! { // new argument
[]
}

View File

@@ -312,7 +312,7 @@ Bootloader将 `BootInfo` 结构以 `&'static BootInfo`参数的形式传递给
use bootloader::BootInfo;
#[no_mangle]
#[unsafe(no_mangle)]
pub extern "C" fn _start(boot_info: &'static BootInfo) -> ! { // new argument
[]
}