summaryrefslogtreecommitdiffstats
path: root/tests/ui/intrinsics/issue-28575.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/intrinsics/issue-28575.rs')
-rw-r--r--tests/ui/intrinsics/issue-28575.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ui/intrinsics/issue-28575.rs b/tests/ui/intrinsics/issue-28575.rs
new file mode 100644
index 000000000..410f664f8
--- /dev/null
+++ b/tests/ui/intrinsics/issue-28575.rs
@@ -0,0 +1,12 @@
+// revisions: mir thir
+// [thir]compile-flags: -Z thir-unsafeck
+
+#![feature(intrinsics)]
+
+extern "C" {
+ pub static FOO: extern "rust-intrinsic" fn();
+}
+
+fn main() {
+ FOO() //~ ERROR: use of extern static is unsafe
+}