New Features

  • #4542 Support env!("OUT_DIR") in include! macro calls in experimental mode. So now the plugin supports all code insight features (highlighting, navigation, completion, etc.) for code generated while compilation in most cases. Under the hood, it uses the output of cargo build --build-plan command to get value of OUT_DIR variable. Note, this feature is disabled by default because found out that cargo build --build-plan forces next build command to recompile whole project (including dependencies). To turn it on just enable org.rust.cargo.fetch.out.dir option in Experimental Features dialog.

  • #4581 Support code coverage in CLion. It’s available since recent 2019.3 EAP release. Implementation is based on grcov utility. If the utility is not installed on your machine, the plugin will suggest installing it. Note, it requires nightly toolchain to instrument code properly.

  • #4397 Make Build action take into account only selected configuration if possible. So, if you have run configuration that runs a specific target, then Build action will build only that target. Note, it works only when build tool window is enabled. You can turn it on via Experimental Features | org.rust.cargo.build.tool.window option

Fixes

  • #4491 Parse macro calls with missing ; at the end in right way. Previously, the plugin showed a lot of syntax errors for macro calls in this case

  • #4572 Correctly highlight async, await and try keywords in code disabled by cfg attribute

  • #4553 Render async keyword for async functions in quick documentation

  • #4513 Take into account async keyword by Implement members quick fix

Internal Improvements

  • Macros improvements:
    • #4491 Implement manual parsing of macro calls. It should make macro call parsing faster and simplify special parser rules for macro calls (like existing parser rules for vec! and include!) in grammar.
    • #4522 Rework mapping between macro calls and the corresponding expansions. It should make implementation more stable in general and fix some sporadic exceptions

Full set of changes can be found here