]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rfc-2091-track-caller/error-with-naked.rs
Rollup merge of #105674 - estebank:iterator-chains, r=oli-obk
[rust.git] / src / test / ui / rfc-2091-track-caller / error-with-naked.rs
1 // needs-asm-support
2 #![feature(naked_functions)]
3
4 use std::arch::asm;
5
6 #[track_caller] //~ ERROR cannot use `#[track_caller]` with `#[naked]`
7 //~^ ERROR `#[track_caller]` requires Rust ABI
8 #[naked]
9 extern "C" fn f() {
10     asm!("", options(noreturn));
11 }
12
13 struct S;
14
15 impl S {
16     #[track_caller] //~ ERROR cannot use `#[track_caller]` with `#[naked]`
17     //~^ ERROR `#[track_caller]` requires Rust ABI
18     #[naked]
19     extern "C" fn g() {
20         asm!("", options(noreturn));
21     }
22 }
23
24 fn main() {}