0.1.21
- Fix span when reporting an incorrect argument type.
For example, given this bridge module...:
#[swift_bridge::bridge]
mod ffi {
extern "Rust" {
#[swift_bridge(rust_name = "some_function")]
fn fn1(arg: &str);
}
}
fn some_function(_arg: u16) {}
Before this release
┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
error[E0308]: mismatched types
--> tests/ui/incorrect-argument-type.rs:1:1
|
1 | #[swift_bridge::bridge]
| ^^^^^^^^^^^^^^^^^^^^^^^ expected `u16`, found `&str`
|
┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
As of this release
┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
error[E0308]: mismatched types
--> tests/ui/incorrect-argument-type.rs:4:16
|
4 | fn fn1(arg: &str);
| ^^^^^^^^^ expected `u16`, found `&str`
┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
- Fix using the
into_return_type
attribute when returning shared structs.
A recent regression broke this behavior.
Added an integration test to prevent this from breaking again.