summaryrefslogtreecommitdiffstats
path: root/tests/rust/namespaces_constant.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/rust/namespaces_constant.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/rust/namespaces_constant.rs b/tests/rust/namespaces_constant.rs
new file mode 100644
index 0000000..01a8450
--- /dev/null
+++ b/tests/rust/namespaces_constant.rs
@@ -0,0 +1,11 @@
+pub const FOO: i32 = 10;
+pub const BAR: &'static str = "hello world";
+pub const ZOM: f32 = 3.14;
+
+#[repr(C)]
+struct Foo {
+ x: [i32; FOO],
+}
+
+#[no_mangle]
+pub extern "C" fn root(x: Foo) { }