Skip to content

Commit 968aa07

Browse files
authored
Rollup merge of #139753 - folkertdev:naked-function-unsafe-attribute, r=tgross35,traviscross
Make `#[naked]` an unsafe attribute tracking issue: rust-lang/rust#138997 Per rust-lang/rust#134213 (comment), the `#[naked]` attribute is now an unsafe attribute (in any edition). This can only be merged when the above PRs are merged, I'd just like to see if there are any CI surprises here, and maybe there is early review feedback too. r? ``@traviscross``
2 parents 04c3fb6 + 5669406 commit 968aa07

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

example/mini_core_hello_world.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -387,11 +387,9 @@ global_asm! {
387387
}
388388

389389
#[cfg(all(not(jit), target_arch = "x86_64"))]
390-
#[naked]
390+
#[unsafe(naked)]
391391
extern "C" fn naked_test() {
392-
unsafe {
393-
naked_asm!("ret");
394-
}
392+
naked_asm!("ret")
395393
}
396394

397395
#[repr(C)]

0 commit comments

Comments
 (0)