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