]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rfc-2091-track-caller/error-with-naked.rs
Rollup merge of #94577 - RalfJung:simd-miri, r=scottmcm
[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 #[naked]
8 extern "C" fn f() {
9     asm!("", options(noreturn));
10 }
11
12 struct S;
13
14 impl S {
15     #[track_caller] //~ ERROR cannot use `#[track_caller]` with `#[naked]`
16     #[naked]
17     extern "C" fn g() {
18         asm!("", options(noreturn));
19     }
20 }
21
22 fn main() {}