Mismatched types error E0308 when there is no error
See original GitHub issueWith the new plugin 52, Version: 0.1.0.2069 and using the jni-rs crate, this error is reported at many places in a Rust / JNI codebase.
JObject::from(env.new_string("hello")?);
mismatched types E0308 expected JThrowable, found JString
JString::from(elem_obj)
mismatched types E0308 expected *mut _jobject, found JObject
JObject and JString can be converted to each other using ::from. source: https://github.com/prevoty/jni-rs/blob/master/src/wrapper/objects/jstring.rs#L25
In the meantime, would there be an way to disable this check? It persists after disabling all inspections in IDEA Settings. Thanks!
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:12 (5 by maintainers)
Top Results From Across the Web
[SOLVED] Why do I get: error[E0308]: mismatched types: note
This fairly common error could probably benefit from having a helpful note in the error message such as "add -> T to the...
Read more >error[E0308]: mismatched types — expected `&str`, found ...
The code is not complete, but I am stuck here. I want to print array_display to the console, but when I assign the...
Read more >Resolving Rust error[E0308] Mismatched Types When Types ...
This blog post explains one possible solution for rust compilation error E0308, mismatched types, when the referenced types actually match.
Read more >Recoverable Errors with Result - The Rust Programming ... - MIT
Let's try it: we know that the return type of File::open isn't of type u32 ... error[E0308]: mismatched types --> src/main.rs:4:18 | 4...
Read more >Recoverable Errors with Result - The Rust Programming ...
If there's no file named hello.txt in our current directory and we run this code, ... Listing 9-5: Handling different kinds of errors...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The issue is still actual for the disabled-by-default inspection =)
@Techcable, the real wizard is @matklad, who patiently created the infrastructure for 2 years, using which I did it in 1-2 lines of code =) You can become a “wizard” like me, just start contributing here!