about summary refs log tree commit diff
path: root/tests/ui/asm
diff options
context:
space:
mode:
authorFolkert de Vries <folkert@folkertdev.nl>2025-05-03 19:10:43 +0200
committerFolkert de Vries <folkert@folkertdev.nl>2025-05-03 19:15:19 +0200
commit9aee0aa453a83f8bee6dc32037e0389f3a9188fe (patch)
treefdda2346e5548ae81821d32a42f2ffb8a5b69234 /tests/ui/asm
parent097cd98869cf07a2860bef16c0d4a2b3b019b23a (diff)
downloadrust-9aee0aa453a83f8bee6dc32037e0389f3a9188fe.tar.gz
rust-9aee0aa453a83f8bee6dc32037e0389f3a9188fe.zip
allow `#[rustfmt::skip]` in combination with `#[naked]`
Diffstat (limited to 'tests/ui/asm')
-rw-r--r--tests/ui/asm/naked-functions.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/ui/asm/naked-functions.rs b/tests/ui/asm/naked-functions.rs
index cb5fde9a80b..a6f41698b41 100644
--- a/tests/ui/asm/naked-functions.rs
+++ b/tests/ui/asm/naked-functions.rs
@@ -231,3 +231,9 @@ pub extern "C" fn compatible_linkage() {
 pub extern "C" fn rustc_std_internal_symbol() {
     naked_asm!("", options(raw));
 }
+
+#[rustfmt::skip]
+#[unsafe(naked)]
+pub extern "C" fn rustfmt_skip() {
+    naked_asm!("", options(raw));
+}