--- source: macro/src/lib.rs 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())" --- mod ffi { #[repr(C)] #[derive(Clone, Copy)] struct Foo {} #[cfg(feature = "bar")] impl Foo { #[cfg(feature = "foo")] pub fn bar(s: u8) { unimplemented!() } } use diplomat_runtime::*; #[no_mangle] #[cfg(feature = "bar")] #[cfg(feature = "foo")] extern "C" fn Foo_bar(s: u8) { Foo::bar(s) } #[no_mangle] extern "C" fn Foo_destroy(this: Box) {} }