Skip to content

Commit 0304173

Browse files
main: replace #[naked] with #[unsafe(naked)] and remove #![feature(naked_functions)]
- Replaced all instances of #[naked] with #[unsafe(naked)] in main.rs, mod.rs, and lib.rs to align with the updated syntax. - Removed the deprecated #![feature(naked_functions)] from the files as it is no longer required. ref: rust-lang/rust#134213 Signed-off-by: manchangfengxu <1848953550@qq.com>
1 parent 54bf600 commit 0304173

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)