mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
25 lines
497 B
Rust
25 lines
497 B
Rust
// needs-asm-support
|
|
#![feature(naked_functions)]
|
|
|
|
use std::arch::asm;
|
|
|
|
#[track_caller] //~ ERROR cannot use `#[track_caller]` with `#[naked]`
|
|
//~^ ERROR `#[track_caller]` requires Rust ABI
|
|
#[naked]
|
|
extern "C" fn f() {
|
|
asm!("", options(noreturn));
|
|
}
|
|
|
|
struct S;
|
|
|
|
impl S {
|
|
#[track_caller] //~ ERROR cannot use `#[track_caller]` with `#[naked]`
|
|
//~^ ERROR `#[track_caller]` requires Rust ABI
|
|
#[naked]
|
|
extern "C" fn g() {
|
|
asm!("", options(noreturn));
|
|
}
|
|
}
|
|
|
|
fn main() {}
|