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

@@ -300,7 +300,7 @@ pub fn _print(args: fmt::Arguments) {
```rust
// in src/main.rs
#[no_mangle]
#[unsafe(no_mangle)]
pub extern "C" fn _start() -> ! {
[]
loop {
@@ -463,7 +463,7 @@ pub fn hlt_loop() -> ! {
```rust
// in src/main.rs
#[no_mangle]
#[unsafe(no_mangle)]
pub extern "C" fn _start() -> ! {
[]
@@ -488,7 +488,7 @@ fn panic(info: &PanicInfo) -> ! {
/// Entry point for `cargo test`
#[cfg(test)]
#[no_mangle]
#[unsafe(no_mangle)]
pub extern "C" fn _start() -> ! {
init();
test_main();