mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 22:37:49 +00:00
The no_mangle attribute is unsafe since Rust 2024
This commit is contained in:
@@ -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) -> ! { // 新しい引数
|
||||
[…]
|
||||
}
|
||||
|
||||
@@ -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
|
||||
[…]
|
||||
}
|
||||
|
||||
@@ -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
|
||||
[…]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user