New Features

  • Highlight non-exhaustive match expressions and useless patterns in match arms . Note, it’s initial version so it doesn’t cover all possible cases at this moment (by @Leidenn2509 & @ortem)

  • Make some improvements of cargo check external annotator:
    • Introduce External linter options instead of cargo check ones. It generalizes settings related to cargo check
    • Make possible to use clippy instead of cargo check to annotate code. You can choose external tool via Preferences | Languages & Frameworks | Rust | Cargo | External linter option
    • Provide External Linter inspection. It allows analyzing all code in batch mode using chosen external linter
    • Create quick fixes from cargo check/clippy suggestions
  • Run rustfmt on the document before saving. It’s disabled by default. You can enable it via Preferences | Languages & Frameworks | Rust | Rustfmt | Run rustfmt on Save option. Note, it can affect UI responsiveness in some cases

  • Support completion of primitive types

  • Add Initialize with a default value quick fix for Use of possibly uninitialized variable error annotation. Note, it just initializes a local variable, so it doesn’t make code valid in all cases

  • Implement Invert If intention (by @zinoviy23)

  • Improve Simplify boolean expression. Now it can convert !(expr1 == expr2) to expr1 != expr2

  • Support crate and pub(in path) restricted visibility better. Now the plugin correctly annotate usage of items with such visibility in wrong places and doesn’t add them in completion

  • Quick documentation improvements:
    • Provide quick documentation for primitive types
    • Correctly resolve links to macros that declared in non-crate root modules
    • Provide correctly links to primitive types and method of primitive types
  • Correctly parse underscore imports. See the corresponding RFC for more details (by @Kobzol)

  • Provide Make mutable quick fix for parameters with reference types (by @snpefk)

  • Support ? operator in macro definition. See the corresponding RFC for more details

  • Show variable’s value by hovering while debugging. Delay time is configurable via Preferences | Build, Execution, Deployment | Debugger | Data Views | Value tooltip delay

Fixes

  • Reformat File with Rustfmt uses correct config file now

  • Don’t jump over multi-line whitespaces in up/down mover

  • Allow expanding std macro invocations like vec![1, 2, 3]

  • Do not allow renaming numeric fields of tuple structs

  • Correctly convert module name to self while Nest use statements intention (by @Kobzol)

  • Don’t try to setup cargo package module roots if project is already disposed. It prevents some weird exceptions on project closing

  • Take into account defaulted type parameters in Implement members refactoring

  • Fix Convert to assert_eq! and Convert to assert_ne! quick fixes. Now they produce correct AST while code transformation

Internal Improvements

  • Add tests to check our analysis on real projects like cargo and tokio

  • Provide binary compatible API for Rust project settings

  • Move ContributedReferenceHost interface to RsLitExpr API from its implementation. So now third-party plugins can rely on it

  • Update IDEA & CLion EAPs and nightly rust