0.1.43
-
Show a spanned compile time error for invalid module items. #124
#[swift_bridge::bridge] mod ffi { use std; fn foo() {} } // error: Only `extern` blocks, structs and enums are supported. // --> tests/ui/invalid-module-item.rs:6:5 // | // 3 | use std; // | ^^^^^^^^ // // error: Only `extern` blocks, structs and enums are supported. // --> tests/ui/invalid-module-item.rs:7:5 // | // 4 | fn foo() {} // | ^^^^^^^^^^^
-
Allow enums to use the
#[already_declared]
attribute. #125// For example, the following is now possible: use some_other_bridge_module::SomeEnum; #[swift_bridge::bridge] mod ffi { #[swift_bridge(already_declared)] enum SomeEnum {} extern "Rust" { fn print(val: SomeEnum); } }