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