about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/asm/binary_asm_labels_allowed.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ui/asm/binary_asm_labels_allowed.rs b/tests/ui/asm/binary_asm_labels_allowed.rs
new file mode 100644
index 00000000000..a21ab8d70f5
--- /dev/null
+++ b/tests/ui/asm/binary_asm_labels_allowed.rs
@@ -0,0 +1,17 @@
+//@ build-pass
+//@ only-aarch64
+
+// The `binary_asm_labels` lint should only be raised on `x86`. Make sure it
+// doesn't get raised on other platforms.
+
+use std::arch::asm;
+
+fn main() {
+    unsafe {
+        asm!("0: bl 0b");
+        asm!("1: bl 1b");
+        asm!("10: bl 10b");
+        asm!("01: bl 01b");
+        asm!("1001101: bl 1001101b");
+    }
+}