We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4154df8 commit f0f4653Copy full SHA for f0f4653
src/test/ui/intrinsics/issue-28575.rs
@@ -0,0 +1,9 @@
1
+#![feature(intrinsics)]
2
+
3
+extern "C" {
4
+ pub static FOO: extern "rust-intrinsic" fn();
5
+}
6
7
+fn main() {
8
+ FOO() //~ ERROR: use of extern static is unsafe
9
src/test/ui/intrinsics/issue-28575.stderr
@@ -0,0 +1,11 @@
+error[E0133]: use of extern static is unsafe and requires unsafe function or block
+ --> $DIR/issue-28575.rs:8:5
+ |
+LL | FOO()
+ | ^^^ use of extern static
+ = note: extern statics are not controlled by the Rust type system: invalid data, aliasing violations or data races will cause undefined behavior
+error: aborting due to previous error
10
11
+For more information about this error, try `rustc --explain E0133`.
0 commit comments