Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

code relies on type inference rules which are likely to change #55

Closed
Hossein-Noroozpour opened this issue Jun 12, 2017 · 3 comments
Closed

Comments

@Hossein-Noroozpour
Copy link

probably msg_send macro is using type inference rules which will be removed in the next coming rustc.
my current rustc version is rustc 1.19.0-nightly (d015610db 2017-06-05)

complete warning is:

@SSheldon
Copy link
Owner

@Hossein-Noroozpour, can you share a snippet of your code that's triggering this warning?

Is it possible that you have some code that looks like this, with no annotated return type?

msg_send![obj, retain];

If so, I believe it should be fixed by adding a type annotation, like:

let _: () = msg_send![obj, retain];

Let me know if the msg_send! usage that causes this error is in the objc crate, but otherwise I think this is something that users of the crate will need to fix themselves.

@Hossein-Noroozpour
Copy link
Author

Thanks, yes, this () was the problem. I think maybe you like to see this: https://stackoverflow.com/questions/44597919/simd-encoding-for-objective-c-runtime/44610154#44610154
the SIMD types have a weird problem in encoding, and unfortunately they are important part of the today graphic system of Mac OS.

@SSheldon
Copy link
Owner

Great, glad that fixed your problem!

Hmm, yeah, that's really interesting that the runtime just entirely skips simd arguments in encodings... definitely not what I would expect. I'll keep that in mind as I work on verify_message! (And now I'm curious to look into simd more, I haven't investigated it much...) Thanks for letting me know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants