Debian Codegraph @

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

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