Skip to content

Commit 08e0e5d

Browse files
authored
Merge pull request #3 from manchangfengxu/fix/replace-naked-attr
replace #[naked] with #[unsafe(naked)] and remove #![feature(naked_functions)]
2 parents 54bf600 + 0304173 commit 08e0e5d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

test-app/src/main.rs

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

65
use core::{
@@ -24,7 +23,7 @@ static mut ROOT_STACK: Stack = Stack([0; 4096]);
2423
static mut FREE_STACK: Stack = Stack([0; 4096]);
2524
static mut ROOT_CONTEXT: FlowContext = FlowContext::ZERO;
2625

27-
#[naked]
26+
#[unsafe(naked)]
2827
#[unsafe(no_mangle)]
2928
#[unsafe(link_section = ".text.entry")]
3029
unsafe extern "C" fn _start() -> ! {
@@ -44,7 +43,7 @@ unsafe extern "C" fn _start() -> ! {
4443
}
4544
}
4645

47-
#[naked]
46+
#[unsafe(naked)]
4847
unsafe extern "C" fn exception() -> ! {
4948
unsafe { naked_asm!("unimp") }
5049
}

0 commit comments

Comments
 (0)