IntelliJ Rust

Rust plugin for IntelliJ IDEA*

*work-in-progress, expect bugs and missing features


Getting alpha builds

IntelliJ Rust is currently in the alpha stage of development. When we reach some acceptable level of stability, we publish alpha builds to the IntelliJ’s main plugin repository. You can download and install these builds directly from Plugins > Browse repositories screen in your IDE.

As this is a preview release, something might go wrong. So, be brave to face some nasty bugs. If you find one, we would very appreciate if you file an issue on our bugtracker or ping us on our chat.

Setting up nightly builds

In addition to preview releases, we also ship pre-release builds of intellij-rust and intellij-toml in the nightly channel.

To use them you need to follow the instructions of adding additional plugin repository and paste the URL for the one you need:

- Rust:

Nightly builds are daily snapshots of current development branch. So, it’s natural that there may be even more bugs than in alpha channel. If you find one, we would very appreciate if you file an issue on our bugtracker or ping us on our chat.

Compatible IDEs

The plugin should be compatible with any Intellij based IDE like IDEA, CLion or PyCharm. Latest plugin is guranteed to support the latest released major platform version (2017.3 at the moment of writing), it may support some previous or EAP versions. See Help > About menu for IDE version and Settings > Plugins menu for plugin version.



What is IntelliJ Rust

Intelligent Rust

We aim to build JetBrains-quality language support for IntelliJ IDEA and related IDEs. Right now, you get native code completionWIP, broad navigation, intentions, formatting and much more...

Corroded IDEA

...while this is still your ol' good IDE. Enjoy highly productive developer experience, VCS integration and other languages support.

What's new

IntelliJ Rust Changelog #94

New Features

  • Highlight non-exhaustive match expressions and useless patterns in match arms gif1 gif2. 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 gif

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

  • Implement Invert If intention gif (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 gif (by @snpefk)

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

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


  • 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