// ignore-mips64
// ignore-powerpc
// ignore-powerpc64
-// ignore-powerpc64le
// ignore-riscv64
// ignore-s390x
// ignore-sparc
#![warn(unused_attributes)]
+#[target_feature(enable = "sse2")]
+//~^ ERROR attribute should be applied to a function
+extern crate alloc;
+//~^ NOTE not a function
+
+#[target_feature(enable = "sse2")]
+//~^ ERROR attribute should be applied to a function
+use alloc::alloc::alloc;
+//~^ NOTE not a function
+
+#[target_feature(enable = "sse2")]
+//~^ ERROR attribute should be applied to a function
+extern "Rust" {}
+//~^ NOTE not a function
+
#[target_feature = "+sse2"]
//~^ ERROR malformed `target_feature` attribute
#[target_feature(enable = "foo")]
f2: u16,
}
+#[target_feature(enable = "sse2")]
+//~^ ERROR attribute should be applied to a function
+type Uwu = ();
+//~^ NOTE not a function
+
#[target_feature(enable = "sse2")]
//~^ ERROR attribute should be applied to a function
trait Baz {}
#[target_feature(enable = "sse2")]
unsafe fn test() {}
+#[target_feature(enable = "sse2")]
+//~^ ERROR attribute should be applied to a function
+static A: () = ();
+//~^ NOTE not a function
+
+#[target_feature(enable = "sse2")]
+//~^ ERROR attribute should be applied to a function
+impl Quux for u8 {}
+//~^ NOTE not a function
+
+#[target_feature(enable = "sse2")]
+//~^ ERROR attribute should be applied to a function
+impl Foo {}
+//~^ NOTE not a function
+
trait Quux {
fn foo();
}