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

@@ -272,7 +272,7 @@ pub fn print_something() {
```rust
// in src/main.rs
#[no_mangle]
#[unsafe(no_mangle)]
pub extern "C" fn _start() -> ! {
vga_buffer::print_something();
@@ -567,7 +567,7 @@ lazy_static! {
```rust
// in src/main.rs
#[no_mangle]
#[unsafe(no_mangle)]
pub extern "C" fn _start() -> ! {
use core::fmt::Write;
vga_buffer::WRITER.lock().write_str("Hello again").unwrap();
@@ -658,7 +658,7 @@ pub fn _print(args: fmt::Arguments) {
```rust
// in src/main.rs
#[no_mangle]
#[unsafe(no_mangle)]
pub extern "C" fn _start() {
println!("Hello World{}", "!");