"Cannot find declaration to go" is not highlighted and only appears after build


In VSCode, variables that are not in score are highlighted, so I can import them. I'm using CLion with the Rust plugin, mainly to use w/ Rust, but unimported symbols are not highlighted as errors.

The "Inspections" tab doesn't show any option to add this basic functionality. 

How do I proceed?

1 comment
Comment actions Permalink

The Rust plugin doesn't highlight variables that are not in the scope on purpose not to produce false-positive errors. We are working on enabling the corresponding inspection for paths (including variables) right now.

But there are some options that you can do right now:
- Actually, `Unresolved reference` inspection in Rust plugin hides unresolved references if there isn't any known way to import them. But you can turn off this behavior via disabling `Ignore unresolved references without quick fix` option in `Rust | Unresolved reference` inspection settings inside `Preferences | Editor | Inspections` settings page. Note, it may produce false positive errors annotations
- Turn on `Run external linter to analyze code on the fly` option in `Preferences | Languages & Frameworks | Rust | External Linters` settings to use `cargo check` or `clippy` as external providers of compiler errors. Note, it may be resource consuming


Please sign in to leave a comment.