Skip to content

Commit 3985e47

Browse files
committed
test: fix integration-test build
1 parent 6f399be commit 3985e47

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

integration-test/bins/multiboot2_chainloader/src/main.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#![no_main]
22
#![no_std]
3-
#![feature(error_in_core)]
43

54
mod loader;
65
mod multiboot;
@@ -16,7 +15,7 @@ core::arch::global_asm!(include_str!("start.S"), options(att_syntax));
1615

1716
/// Entry into the Rust code from assembly using the x86 SystemV calling
1817
/// convention.
19-
#[no_mangle]
18+
#[unsafe(no_mangle)]
2019
fn rust_entry(multiboot_magic: u32, multiboot_hdr: *const u32) -> ! {
2120
init_environment();
2221
let x = 0.12 + 0.56;

integration-test/bins/multiboot2_chainloader/src/multiboot.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ struct Mem;
2525
impl MemoryManagement for Mem {
2626
unsafe fn paddr_to_slice(&self, addr: PAddr, size: usize) -> Option<&'static [u8]> {
2727
let ptr = addr as *const u64 as *const u8;
28-
Some(slice::from_raw_parts(ptr, size))
28+
Some(unsafe { slice::from_raw_parts(ptr, size) })
2929
}
3030

3131
// If you only want to read fields, you can simply return `None`.

integration-test/bins/multiboot2_payload/src/main.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#![no_main]
22
#![no_std]
3-
#![feature(error_in_core)]
43

54
extern crate alloc;
65

@@ -16,7 +15,7 @@ use util::{init_environment, qemu_exit_success};
1615
mod verify;
1716

1817
/// Entry into the Rust code from assembly.
19-
#[no_mangle]
18+
#[unsafe(no_mangle)]
2019
fn rust_entry(multiboot2_magic: u32, multiboot2_hdr: u32) -> ! {
2120
main(multiboot2_magic, multiboot2_hdr).expect("Should run multiboot2 integration test");
2221
log::info!("Integration test finished successfully");

multiboot2-header/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ include it like this:
7575

7676
```
7777
#[used]
78-
#[no_mangle]
78+
#[unsafe(no_mangle)]
7979
#[link_section = ".text.multiboot2_header"]
8080
static MULTIBOOT2_HDR: [u8; 64] = *include_bytes!("mb2_hdr_dump.bin");
8181
```

0 commit comments

Comments
 (0)