New Features

  • Provide common IDE features (highlighting, name resolution, completion, linting, fixes, etc.) for Rust code snippets in documentation comments. It should make writing documentation more convenient. You can disable it via Preferences | Languages & Frameworks | Rust | Inject Rust language to documentation comments option

  • Improve rename refactoring:
    • Correctly handle trait items renaming. Now when you rename trait item the corresponding items in trait impls are also renamed and vice versa

    • Support in-place mode. Previously, it was available only for local variables. Now renaming of all Rust items supports this mode. You can enable/disable it via Preferences | Editor | General | Refactorings | Enable in-place mode

  • Auto import improvements:
    • Automatically add trait import while trait method completion. You can disable it via Preferences | Editor | General | Auto Import | Rust | Import out of scope items while completion option

    • Group auto-inserted use item with existing ones by the last component when auto import

  • Make some improvements of cargo check external annotator:
    • Run the annotator in parallel with other analysis. Now it should show the corresponding error and warning annotation much faster
    • Add ability to pass arguments to the annotator
  • Support multiple patterns in if let and while let expressions. See the corresponding issue for more details

  • Extract expected and actual results for failed comparison tests, so now you can see the difference in a separate window for such tests

  • Handle 8-bit and 24-bit ANSI color escapes in console properly. Primarily it affects cargo console output at Windows, so now it should be colored as expected

  • Provide ref and refm postfix completions (by @t-kameyama)

  • Move some error annotation like Missing members, Unknown member, etc. into separate Trait implementation inspection. So now it’s possible to change attributes (severity, scope, etc.) of these annotations or even disable them via the inspection settings (Preferences | Editor | Inspections)

  • Аdd Reformat File with Rustfmt to Cargo tool window

  • New icon for generic toml files

Fixes

  • Highlight more precise ranges of unsafe operations

  • Fix String and OsString GDB formatters for nightly compiler

  • Do not annotate functions from extern blocks with #[wasm_bindgen] attribute as unsafe

  • Correctly apply Make mutable quick fix for tuple patterns in function arguments

  • Fix false positive error annotation irrefutable let pattern is experimental for const patterns

  • Correctly invalidate caches for injected Rust code. It should fix weird bugs with name resolution and type inference in injected Rust code

Internal Improvements

  • Update EAP IDEA & CLion