summaryrefslogtreecommitdiffstats
path: root/tests/rust/opaque.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/rust/opaque.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/rust/opaque.rs b/tests/rust/opaque.rs
new file mode 100644
index 0000000..7e1c6be
--- /dev/null
+++ b/tests/rust/opaque.rs
@@ -0,0 +1,10 @@
+/// Fast hash map used internally.
+type FastHashMap<K, V> =
+ std::collections::HashMap<K, V, std::hash::BuildHasherDefault<std::collections::hash_map::DefaultHasher>>;
+
+pub type Foo = FastHashMap<i32, i32>;
+
+pub type Bar = Result<Foo, ()>;
+
+#[no_mangle]
+pub extern "C" fn root(a: &Foo, b: &Bar) {}