New Features

  • Support Rust documentation rendering in an editor. Just click to the corresponding icon on gutter to look at rendered version of a particular comment. Also, you can enable it by default via Render documentation comments option in Preferences / Settings | Editor | General | Appearance settings. Note, there are some restrictions in 2020.1 IDEs. See here for more details

  • Provide initial formatter for TOML. Currently, it affects only spacing and indentation. You can adjust settings via Preferences / Settings | Editor | Code Style | TOML panel (by @Kobzol)

  • Add quick fix for Mismatched types error annotation to change type of local variable (by @Kobzol)

  • Make Go to Type Declaration Ctrl+Shift+B action work properly with macro-generated items

  • Keep existing reference style while Move F6 refactoring, i.e. absolute paths stay absolute, one segment paths stay one segment, etc.

Performance Improvements

  • Slightly speed up indexing. Now, the plugin correctly handle new experimental raw syntax and doesn’t parse blocks with it while indexing that decreases duration of the corresponding phase

Fixes

  • Test tool window improvements:
    • Show whole Cargo output in Test tool window
    • Navigate to proper line from doc test item in test tree
    • Use Left/Right labels instead of Expected/Actual (by @Kobzol)
  • Name resolution fixes:
    • Properly handle crate::macro_name! calls while name resolution. Previously, such calls couldn’t be resolved and as a result, the plugin couldn’t expand the corresponding macro call
    • Do not resolve project dependencies in build scripts and build dependencies inside common project code
  • Handle module re-exports with aliases while path collection for auto import. Previously, the plugin didn’t take into account module aliases that led to the absence of Import quick fix in some cases
  • Do not offer let and return keywords inside struct literals and struct patterns while completion (by @Kobzol)
  • Improve Add unsafe to block quick fix to find the closest enclosing block (by @Kobzol)
  • Improve documentation links for dependencies in Cargo.toml
  • Fix IndexOutOfBoundsException because of invalid rustc annotation
  • Fix Synchronous execution on EDT exception while new Rust project creation
  • Fix possible PsiInvalidAccessException and wrong name resolution in some cases

Internal Improvements

  • Introduce Crate and Crate Graph abstractions. Previously, the plugin operated with raw Cargo targets. Now, most of the target usages replaced with Cargo-independent Crate API. It should isolate knowledge about build system from common language code like name resolution, completion, etc. Which in turn makes the existent code clearer and should simplify support for new build tools in the future

Full set of changes can be found here