blob: cb7633b7068a36b01d1e952811577d687c089f8f [file] [log] [blame] [view]
Functions marked with the `#[naked]` attribute are restricted in what other
attributes they may be marked with.
Notable attributes that are incompatible with `#[naked]` are:
* `#[inline]`
* `#[track_caller]`
* `#[test]`, `#[ignore]`, `#[should_panic]`
Erroneous code example:
```compile_fail,E0736
#[inline]
#[naked]
fn foo() {}
```
These incompatibilities are due to the fact that naked functions deliberately
impose strict restrictions regarding the code that the compiler is
allowed to produce for this function.