2021-04-12 19:00:00 -05:00
|
|
|
// needs-asm-support
|
2021-12-09 18:15:33 -06:00
|
|
|
#![feature(naked_functions)]
|
|
|
|
|
|
|
|
use std::arch::asm;
|
2019-07-19 19:55:58 -05:00
|
|
|
|
2020-04-07 20:49:53 -05:00
|
|
|
#[track_caller] //~ ERROR cannot use `#[track_caller]` with `#[naked]`
|
2022-04-14 07:07:36 -05:00
|
|
|
//~^ ERROR `#[track_caller]` requires Rust ABI
|
2019-07-19 19:55:58 -05:00
|
|
|
#[naked]
|
2020-12-06 18:00:00 -06:00
|
|
|
extern "C" fn f() {
|
|
|
|
asm!("", options(noreturn));
|
|
|
|
}
|
2020-04-07 20:49:53 -05:00
|
|
|
|
|
|
|
struct S;
|
|
|
|
|
|
|
|
impl S {
|
|
|
|
#[track_caller] //~ ERROR cannot use `#[track_caller]` with `#[naked]`
|
2022-04-14 07:07:36 -05:00
|
|
|
//~^ ERROR `#[track_caller]` requires Rust ABI
|
2020-04-07 20:49:53 -05:00
|
|
|
#[naked]
|
2020-12-06 18:00:00 -06:00
|
|
|
extern "C" fn g() {
|
|
|
|
asm!("", options(noreturn));
|
|
|
|
}
|
2020-04-07 20:49:53 -05:00
|
|
|
}
|
|
|
|
|
2019-07-19 19:55:58 -05:00
|
|
|
fn main() {}
|