Skip to content

Commit c478f72

Browse files
committed
x86, riscv64: mark constructors as unsafe
1 parent c2ea2b4 commit c478f72

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/riscv64.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const fn exit_code_encode(code: u32) -> u32 {
2626

2727
impl RISCV64 {
2828
/// Create an instance.
29-
pub const fn new(addr: u64) -> Self {
29+
pub const unsafe fn new(addr: u64) -> Self {
3030
RISCV64 { addr }
3131
}
3232
}

src/x86.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ fn outl(io_base: u16, code: u32) {
3333

3434
impl X86 {
3535
/// Create an instance.
36-
pub const fn new(io_base: u16, custom_exit_success: u32) -> Self {
36+
pub const unsafe fn new(io_base: u16, custom_exit_success: u32) -> Self {
3737
assert!((custom_exit_success & 1) == 1);
3838

3939
X86 {

0 commit comments

Comments
 (0)