about summary refs log tree commit diff
path: root/tests/ui/target-feature/tied-features.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/target-feature/tied-features.rs')
-rw-r--r--tests/ui/target-feature/tied-features.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/ui/target-feature/tied-features.rs b/tests/ui/target-feature/tied-features.rs
index e36649d8eb1..c6cdf21a3e3 100644
--- a/tests/ui/target-feature/tied-features.rs
+++ b/tests/ui/target-feature/tied-features.rs
@@ -1,4 +1,3 @@
-//@ build-fail
 //@ compile-flags: --crate-type=rlib --target=aarch64-unknown-linux-gnu
 //@ needs-llvm-components: aarch64
 #![feature(no_core, lang_items)]
@@ -7,7 +6,6 @@
 #[lang="sized"]
 trait Sized {}
 
-// FIXME: this should not need to be public.
 pub fn main() {
     #[target_feature(enable = "pacg")]
     //~^ ERROR must all be either enabled or disabled together
@@ -25,10 +23,15 @@ pub fn main() {
 //~^ ERROR must all be either enabled or disabled together
 unsafe fn foo() {}
 
-
 #[target_feature(enable = "paca,pacg")]
 unsafe fn bar() {}
 
 #[target_feature(enable = "paca")]
 #[target_feature(enable = "pacg")]
 unsafe fn baz() {}
+
+// Confirm that functions which do not end up collected for monomorphisation will still error.
+
+#[target_feature(enable = "paca")]
+//~^ ERROR must all be either enabled or disabled together
+unsafe fn unused() {}