Debian Codegraph @

third_party/rust/uniffi/tests/ui/proc_macro_arc.rs

raw
1 use std::sync::Arc;
2
3 fn main() {}
4
5 // Normally this is defined by the scaffolding code, manually define it for the UI test
6 pub struct UniFfiTag;
7
8 pub struct Foo;
9
10 #[uniffi::export]
11 fn make_foo() -> Arc<Foo> {
12 Arc::new(Foo)
13 }
14
15 mod child {
16 use std::sync::Arc;
17
18 enum Foo {}
19
20 #[uniffi::export]
21 fn take_foo(foo: Arc<Foo>) {
22 match &*foo {}
23 }
24 }