• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1---
2source: macro/src/lib.rs
3assertion_line: 780
4expression: "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<'b>\n                                RefList<'b>\n                                {\n                                    pub fn extend(&mut self, other: &Self) -> Self\n                                    { unimplemented!() }\n                                }\n                            }\n                        }).to_token_stream().to_string())"
5---
6mod ffi {
7    struct RefList<'a> {
8        data: &'a i32,
9        next: Option<Box<Self>>,
10    }
11    impl<'b> RefList<'b> {
12        pub fn extend(&mut self, other: &Self) -> Self {
13            unimplemented!()
14        }
15    }
16    use core::ffi::c_void;
17    use diplomat_runtime::*;
18    #[no_mangle]
19    extern "C" fn RefList_extend<'b>(this: &mut RefList<'b>, other: &RefList<'b>) -> RefList<'b> {
20        this.extend(other)
21    }
22    #[no_mangle]
23    extern "C" fn RefList_destroy<'a>(this: Box<RefList<'a>>) {}
24}
25