about summary refs log tree commit diff
path: root/tests/ui/target-feature/allowed-softfloat-target-feature-attribute.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/target-feature/allowed-softfloat-target-feature-attribute.rs')
-rw-r--r--tests/ui/target-feature/allowed-softfloat-target-feature-attribute.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/target-feature/allowed-softfloat-target-feature-attribute.rs b/tests/ui/target-feature/allowed-softfloat-target-feature-attribute.rs
new file mode 100644
index 00000000000..8b60820cc9b
--- /dev/null
+++ b/tests/ui/target-feature/allowed-softfloat-target-feature-attribute.rs
@@ -0,0 +1,11 @@
+//@ compile-flags: --target=x86_64-unknown-none --crate-type=lib
+//@ needs-llvm-components: x86
+//@ build-pass
+#![feature(no_core, lang_items, x87_target_feature)]
+#![no_core]
+
+#[lang = "sized"]
+pub trait Sized {}
+
+#[target_feature(enable = "x87")]
+pub unsafe fn my_fun() {}