In this release, we enable the new macro expansion engine by default. It was a quite long story for us, so we decided to increase the version of our plugin from 0.2 to 0.3. Meet the IntelliJ Rust 0.3! We’ll release a dedicated blog post about the new expansion engine in CLion blog soon.

New Features

  • #5716 Enable new macro expansion engine by default. Let’s remember why the new engine is better:
    • it supports impl blocks and mod declarations generated by declarative macros, i.e. if some methods are inside impl block generated by macro invocation, the plugin makes name resolution and completions for these methods as expected. Support for generated mod declarations provides proper name resolution and completion for crates like tokio, async-std, reqwest, etc.
    • it’s now possible to find macro-generated items by Go To Struct Declaration Ctrl + N or Go To Symbol Ctrl + Shift + N.
    • it brings semantic highlighting in macro invocations;
    • most of the IDE features now work inside macro invocations just like in a regular code: code completion, Find Usages / Go To Declaration (Ctrl + B), Go To Implementation (Ctrl + Alt + B), Go To Type Declaration (Ctrl + Shift + B), Type Info (Ctrl + Shift + P), Extend Selection (Ctrl + W), etc.

    If you ran into an issue with the new engine, you can switch it back to the old one in the plugin settings Settings | Languages & Frameworks | Rust | Expand Declarative Macros.

  • #5455 Add initial implementation of Move refactoring (F6) for top-level items like structs, enums, etc.

  • #5624 Initial support of unstable or_patterns syntax. Note, some code analysis may still not work with such patterns

  • #5687 Add an option to sort items alphabetically in Structure View (Ctrl + F12) (by @t-kameyama)

  • #5652 Allow extracting non-root modules with Extract inline module intention action (by @Kobzol)

  • #5705 Update icons for targets in the Cargo tool window (see differences)

  • #5693 Notify users if they use too old Rust toolchain that isn’t already supported by the plugin. Today we support Rust 1.32.0 or higher.

Fixes

  • #5612 Use more precise error annotations for missing/extraneous function call arguments. Previously, all function arguments were highlighted (by @Kobzol)

  • #5653 Render aliased types for local bindings in the quick documentation Ctrl + Q (by @Kobzol)

  • #5689 Fix location detection of cargo binaries like evcxr (used by Rust REPL) or grcov (needed for Run with Coverage)

  • #5683 Fix Run external linter action (was broken in the previous release) (by @Stzx)

  • #5679 Fix infinite cargo refresh if you have openid = 0.4.0 dependency crate

  • #5678 Fix false-positive annotation produced by Lift return inspection on match expression without any arm.

  • #5670 Fix some false-positives in move analysis related to path assignments. See the issue for details.

  • #5669 Fix some corner cases in doc rendering (Ctrl + Q). See the issue for details.

  • #5441 Fix Run with Coverage

Performance Improvements

  • #5674 Slightly speed up highlighting and macro expansion

Internal Improvements

  • #5672 Add custom-build cargo target kind (needed in order to distinguish cargo target for build.rs)

  • #5649, #5667 Release Toml plugin builds from GitHub Actions

Full set of changes can be found here