about summary refs log tree commit diff
path: root/tests/ui/asm/naked-functions-inline.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/asm/naked-functions-inline.rs')
-rw-r--r--tests/ui/asm/naked-functions-inline.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/ui/asm/naked-functions-inline.rs b/tests/ui/asm/naked-functions-inline.rs
index 9a4f7547518..cfb38f2e738 100644
--- a/tests/ui/asm/naked-functions-inline.rs
+++ b/tests/ui/asm/naked-functions-inline.rs
@@ -29,3 +29,10 @@ pub unsafe extern "C" fn inline_always() {
 pub unsafe extern "C" fn inline_never() {
     asm!("", options(noreturn));
 }
+
+#[naked]
+#[cfg_attr(all(), inline(never))]
+//~^ ERROR [E0736]
+pub unsafe extern "C" fn conditional_inline_never() {
+    asm!("", options(noreturn));
+}