IntelliJ Rust

Open-source Rust plugin for IntelliJ-based IDEs

Install

Stable builds

IntelliJ Rust is in active development, and we regularly publish new stable builds to the JetBrains plugin repository. You can download and install them directly from Settings / Preferences | Plugins | Marketplace in your IDE.

Nightly builds

In addition to stable releases, we also ship nightly snapshots of the intellij-rust development branch. To use the nightly channel, add a custom plugin repository and set the following URL:

https://plugins.jetbrains.com/plugins/nightly/8182

Compatible IDEs

The plugin is compatible with all Intellij-based IDEs like IDEA, CLion, or PyCharm. The latest plugin version supports the latest released platform version (for example, 2019.2).

Bug reports and feature requests

Please use our tracker. You can get there quickly right from the IDE: call Create New Issue on a selected piece of code, and you’ll jump to a pre-filled issue creating form.

Also feel free to ping us on Gitter.

×

Source

Intelligent Rust

editor features

IntelliJ Rust brings JetBrains-quality language support and full IDE experience to your Rust workflow.

Rust becomes native to IDEA, CLion, and other IntelliJ IDEs with smart coding assistance, seamless Cargo support, and built-in test runner.

In CLion, you get even more: fully-fledged debugger, CPU profiler, and Valgrind memcheck.

What's new

IntelliJ Rust Changelog #113

New Features

  • Add Lift return inspection. Now the plugin highlights if and match expressions where return can be lifted out of branches of the expression.

  • Treat todo macro calls as todo items, i.e they have the corresponding highlighting and can be found in TODO tool window

    highlight todo macro

  • Provide completion for fields of builtin tuple types
  • Check type mismatch errors in const generic arguments in some cases

    const generic type mismatch

  • Support unstable attribute for items. Now if you use item marked with unstable attribute without the corresponding feature, the plugin highlights the usage as an error and suggest quick fix in case of nightly toolchain
  • Make Specify type explicitly intention work with complex patterns like let (a, b) = some_expr

Fixes

  • Optimize Show Usages (Ctrl+Alt+F7/Cmd+Alt+F7) for associated items. It should significantly speed up search of associated items with commonly used names like new

  • Improve patterns support:
    • Fix parser rule for range patterns. Now it should correctly process patterns like X..=Y where X is some variable. Previously, it leads to syntax error
    • Fix name resolution in struct and tuple struct patterns. It should prevent unexpected multiple name resolution results in some cases
  • Type inference improvements:
    • Take into account builtin implementation of Clone and Copy traits for tuple types while type inference. Also, consider that generic types with #[derive(Copy)] implements Copy traits only when all type components implement Copy. It should fix various bugs in type inference, type mismatch and borrow checker inspections for the corresponding types
    • Fix type inference inside tuple and struct tuple patterns after ..
  • Parse _ as constant name properly

Full set of changes can be found here