Debian Codegraph @

third_party/rust/diplomat/src/snapshots/diplomat__tests__cfged_method-2.snap

raw
1 ---
2 source: macro/src/lib.rs
3 expression: "rustfmt_code(&gen_bridge(parse_quote! {\n mod ffi\n {\n struct Foo {} #[cfg(feature = \"bar\")] impl Foo\n {\n #[cfg(feature = \"foo\")] pub fn bar(s : u8)\n { unimplemented! () }\n }\n }\n }).to_token_stream().to_string())"
4 ---
5 mod ffi {
6 #[repr(C)]
7 #[derive(Clone, Copy)]
8 struct Foo {}
9 #[cfg(feature = "bar")]
10 impl Foo {
11 #[cfg(feature = "foo")]
12 pub fn bar(s: u8) {
13 unimplemented!()
14 }
15 }
16 use diplomat_runtime::*;
17 #[no_mangle]
18 #[cfg(feature = "bar")]
19 #[cfg(feature = "foo")]
20 extern "C" fn Foo_bar(s: u8) {
21 Foo::bar(s)
22 }
23 #[no_mangle]
24 extern "C" fn Foo_destroy(this: Box<Foo>) {}
25 }
26