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.

2 comments
Comment actions Permalink
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.

Comment actions Permalink

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

Please sign in to leave a comment.