-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use
naked_asm!
in feature-gate-naked_functions test
- Loading branch information
1 parent
863f235
commit 7dbd972
Showing
2 changed files
with
45 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,22 @@ | ||
//@ needs-asm-support | ||
|
||
use std::arch::asm; | ||
use std::arch::naked_asm; | ||
//~^ ERROR use of unstable library feature 'naked_functions' | ||
|
||
#[naked] | ||
//~^ the `#[naked]` attribute is an experimental feature | ||
extern "C" fn naked() { | ||
naked_asm!("", options(noreturn)) | ||
//~^ ERROR: requires unsafe | ||
//~^ ERROR use of unstable library feature 'naked_functions' | ||
//~| ERROR: requires unsafe | ||
} | ||
|
||
#[naked] | ||
//~^ the `#[naked]` attribute is an experimental feature | ||
extern "C" fn naked_2() -> isize { | ||
naked_asm!("", options(noreturn)) | ||
//~^ ERROR: requires unsafe | ||
//~^ ERROR use of unstable library feature 'naked_functions' | ||
//~| ERROR: requires unsafe | ||
} | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters