You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not compatible with verify_message feature of rust-objc crate.
To reproduce:
[dependencies.objc]
version = "^0.2"default-features = falsefeatures = ["verify_message"]
Compilation error example:
error[E0277]: the trait bound `&<Self as value::INSValue>::Value: objc::Encode` is not satisfied
--> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/objc-foundation-0.1.1/src/value.rs:40:34
|
40 | let obj: *mut Self = msg_send![obj, initWithBytes:&value
| __________________________________^
41 | | objCType:encoding.as_ptr()];
| |________________________________________________________________________________^ the trait `objc::Encode` is not implemented for `&<Self as value::INSValue>::Value`
|
= help: consider adding a `where &<Self as value::INSValue>::Value: objc::Encode` bound
= note: required because of the requirements on the impl of `objc::EncodeArguments` for `(&<Self as value::INSValue>::Value, *const i8)`
= note: required by `objc::send_message`
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
The text was updated successfully, but these errors were encountered:
Hey @fzzr-, I'm not too surprised by this. Message verification is super rough and not ready for wide usage. In this case, it looks like the problem is that we haven't told Rust what the encoding is for pointer types. There's a bit more detail about this in SSheldon/rust-objc#26. Unfortunately, I don't see any way to solve this without specialization.
(#2 is another example of an encoding issue that will trip up message verification.)
I'll close this out because I think it's a bigger issue than for just this crate, but if you have any ideas of how to solve it please comment on SSheldon/rust-objc#26!
Not compatible with
verify_message
feature ofrust-objc
crate.To reproduce:
Compilation error example:
The text was updated successfully, but these errors were encountered: