2021-04-13 00:00:00 +00:00
|
|
|
//@ needs-asm-support
|
2021-12-10 00:15:33 +00:00
|
|
|
|
2024-08-04 17:19:08 +02:00
|
|
|
use std::arch::naked_asm;
|
|
|
|
//~^ ERROR use of unstable library feature 'naked_functions'
|
2020-12-07 00:00:00 +00:00
|
|
|
|
2016-03-22 14:08:56 +01:00
|
|
|
#[naked]
|
|
|
|
//~^ the `#[naked]` attribute is an experimental feature
|
2020-12-07 00:00:00 +00:00
|
|
|
extern "C" fn naked() {
|
2024-09-05 13:45:26 +02:00
|
|
|
naked_asm!("")
|
2024-08-04 17:19:08 +02:00
|
|
|
//~^ ERROR use of unstable library feature 'naked_functions'
|
|
|
|
//~| ERROR: requires unsafe
|
2020-12-07 00:00:00 +00:00
|
|
|
}
|
2016-03-22 14:08:56 +01:00
|
|
|
|
|
|
|
#[naked]
|
|
|
|
//~^ the `#[naked]` attribute is an experimental feature
|
2020-12-07 00:00:00 +00:00
|
|
|
extern "C" fn naked_2() -> isize {
|
2024-09-05 13:45:26 +02:00
|
|
|
naked_asm!("")
|
2024-08-04 17:19:08 +02:00
|
|
|
//~^ ERROR use of unstable library feature 'naked_functions'
|
|
|
|
//~| ERROR: requires unsafe
|
2016-03-22 14:08:56 +01:00
|
|
|
}
|
2019-01-02 17:14:24 +03:00
|
|
|
|
|
|
|
fn main() {}
|