diff options
Diffstat (limited to 'third_party/rust/diplomat/src/snapshots/diplomat__tests__mod_with_enum.snap')
-rw-r--r-- | third_party/rust/diplomat/src/snapshots/diplomat__tests__mod_with_enum.snap | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/third_party/rust/diplomat/src/snapshots/diplomat__tests__mod_with_enum.snap b/third_party/rust/diplomat/src/snapshots/diplomat__tests__mod_with_enum.snap new file mode 100644 index 0000000000..723e17d786 --- /dev/null +++ b/third_party/rust/diplomat/src/snapshots/diplomat__tests__mod_with_enum.snap @@ -0,0 +1,23 @@ +--- +source: macro/src/lib.rs +expression: "rustfmt_code(&gen_bridge(parse_quote! {\n mod ffi\n {\n enum Abc { A, B = 123, } impl Abc\n { pub fn do_something(& self) { unimplemented! () } }\n }\n }).to_token_stream().to_string())" +--- +mod ffi { + #[repr(C)] + enum Abc { + A, + B = 123, + } + impl Abc { + pub fn do_something(&self) { + unimplemented!() + } + } + #[no_mangle] + extern "C" fn Abc_do_something(this: &Abc) { + this.do_something() + } + #[no_mangle] + extern "C" fn Abc_destroy(this: Box<Abc>) {} +} + |