summaryrefslogtreecommitdiffstats
path: root/third_party/rust/uniffi/tests/ui/proc_macro_arc.rs
blob: bdffc020e0a35fb0f1832ac3004b3cad0a49ee15 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
use std::sync::Arc;

fn main() {}

pub struct Foo;

#[uniffi::export]
fn make_foo() -> Arc<Foo> {
    Arc::new(Foo)
}

mod child {
    use std::sync::Arc;

    enum Foo {}

    #[uniffi::export]
    fn take_foo(foo: Arc<Foo>) {
        match &*foo {}
    }
}

mod uniffi_types {
    pub use super::Foo;
}