Description
This is probably not a bug that needs to be fixed in rust-objc, but a warning to developers since it causes runtime crashes with unclear errors.
Previously, both of these worked, assuming setThing: returned void:
let _ = msg_send![obj, setThing: 1];
msg_send![obj, setThing: 0];
They worked because Rust inferred unknown types as (). As of recent Rust nightly builds, unknown types are inferred as a new '!' type (see: rust-lang/rust#48950).
Unfortunately, Rust will build it and the crashes occur at runtime. Depending on which features you have compiled rust-objc with, you either get a panic at the calling line, a panic in objc_exception, or a segfault.
The error messages are entirely unhelpful unless you build rust-objc with the verify_message
feature, which catches it at compile-time.
Fix by forcing the type back to ():
let _: () = msg_send![obj, setThing: 1];