Skip to content

Commit

Permalink
disallow asm! in #[naked] functions
Browse files Browse the repository at this point in the history
also disallow the `noreturn` option, and infer `naked_asm!` as `!`
  • Loading branch information
folkertdev committed Oct 6, 2024
1 parent cc09cb0 commit 4ca50c3
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions core/src/arch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,3 @@ pub macro naked_asm("assembly template", $(operands,)* $(options($(option),*))?)
pub macro global_asm("assembly template", $(operands,)* $(options($(option),*))?) {
/* compiler built-in */
}

/// Inline assembly used in combination with `#[naked]` functions.
///
/// Refer to [Rust By Example] for a usage guide and the [reference] for
/// detailed information about the syntax and available options.
///
/// [Rust By Example]: https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html
/// [reference]: https://doc.rust-lang.org/nightly/reference/inline-assembly.html
#[unstable(feature = "naked_functions", issue = "90957")]
#[rustc_builtin_macro]
#[cfg(not(bootstrap))]
pub macro naked_asm("assembly template", $(operands,)* $(options($(option),*))?) {
/* compiler built-in */
}

0 comments on commit 4ca50c3

Please sign in to comment.