rust/tests/ui/rfc-2091-track-caller/error-with-naked.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
497 B
Rust
Raw Normal View History

// 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]
2020-12-06 18:00:00 -06:00
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]
2020-12-06 18:00:00 -06:00
extern "C" fn g() {
asm!("", options(noreturn));
}
}
fn main() {}