CLion Failed to detect error in Rust?

Answered

I'm going through the Rust book, and discovered something that surprised me -- I haven't spent much time in CLion other than playing with rust, but normally a build error in an IntelliJ IDE would show up on the right hand bar, but this error which `rustc` clearly catches doesn't seem to get annotated in CLion.

Does CLion just not do those sorts of things that I'm used to from other IntelliJ IDEs? Is there a setting I'm missing? Why does the right bar show all green?

I mean, yes, I can see the error in the build pane, and yes, I know what the problem is, I'm just a little puzzled by the presentation.

1
5 comments
Official comment

Hello Geoffrey,

Unfortunately, error highlighting is not yet fully implemented. You can find a detailed explanation here.

A temporary solution is to use an external linter. To enable it, select `Run external linter to analyze code on the fly` from Preferences > Languages & Frameworks > Rust > Cargo.

Ok, thanks -- I look forward to seeing more of that built in, but in the meantime, still happy to have some Rust support in an IntelliJ IDE. ;)

0

Hello. It's been almost 2 years since this discussion started. https://github.com/intellij-rust/intellij-rust/issues/5043#issuecomment-594376150

I would like to know if there are any updates on this temporary fix, as you called it.
Thank you

0

The Rust plugin still doesn't handle all compiler errors/lints
https://github.com/intellij-rust/intellij-rust/issues/5043#issuecomment-594376150 is still relevant although some new errors were supported.
You can check the progress in this and this issues

0

This is a severe deficiency. The IDE loses much of its value until this is resolved.

0

Please sign in to leave a comment.