summaryrefslogtreecommitdiffstats
path: root/third_party/rust/diplomat/src/snapshots/diplomat__tests__self_params.snap
blob: 6b931197ab4182439468c077c2c111d7b564062b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
---
source: macro/src/lib.rs
expression: "rustfmt_code(&gen_bridge(parse_quote! {\n                            mod ffi\n                            {\n                                #[diplomat :: opaque] struct RefList < 'a >\n                                { data : & 'a i32, next : Option < Box < Self >>, } impl <\n                                'b > RefList < 'b >\n                                {\n                                    pub fn extend(& mut self, other : & Self) -> Self\n                                    { unimplemented! () }\n                                }\n                            }\n                        }).to_token_stream().to_string())"
---
mod ffi {
    struct RefList<'a> {
        data: &'a i32,
        next: Option<Box<Self>>,
    }
    impl<'b> RefList<'b> {
        pub fn extend(&mut self, other: &Self) -> Self {
            unimplemented!()
        }
    }
    #[no_mangle]
    extern "C" fn RefList_extend<'b>(this: &mut RefList<'b>, other: &RefList<'b>) -> RefList<'b> {
        this.extend(other)
    }
    #[no_mangle]
    extern "C" fn RefList_destroy<'a>(this: Box<RefList<'a>>) {}
}