Debian Codegraph @

third_party/rust/diplomat/src/snapshots/diplomat__tests__self_params.snap

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