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 #163

New Features

  • #8018 Add a widget for the external linter. Widget indicates whether the linter is turned on. Also, the widget shows a notification when linter significantly affects the code analysis performance. The external linter settings were moved to Preferences | Languages & Frameworks | Rust | External Linters

  • #8132 Add Extract trait refactoring (Refactor | Extract trait)

  • #8315 Complete the second path segment if the first segment is unresolved but can be imported.

  • #8284 Provide completion for out-of-scope items when invoked at an empty place (by Ctrl+Space).

  • #6353 Detect Const cannot refer to static E0013 compiler error (by @zeroeightysix)

  • #8144 Detect E0747 compiler error

  • #8289 Prioritize expressions that can be implicitly coerced to the expected type when suggesting completion variants

  • #8335 Do not run non-syntax inspections on files disabled by cfg attributes

  • #8323 Process available items generated by build script and expand available procedural macro calls even if the whole project host code (build scripts and procedural macro libraries) cannot be successfully compiled and executed. Note, build script evaluation is disabled by default for now. To turn it on, enable org.rust.cargo.evaluate.build.scripts experimental feature

  • #8119 Enable new name resolution inside functions bodies. It allows resolving macros 2.0 declared inside function bodies

Fixes

  • Auto-import improvements:
    • #8291 Improve sorting of auto-import variants

    • #8288 Fix auto-import from alloc crate when using #![no_std]

    • #8286 Don’t show auto-import from auxiliary stdlib crates such as unwind

  • #8362 Do not produce a false-positive error about missing format macro arguments without format_args_capture feature starting with 1.58

  • #8334 Don’t perform project model reloading when another IDE project become trusted

  • #8318 Expand proc macros from dev-dependencies. Note, procedural macro expansion is still under development, and it’s disabled by default for now. To turn it on, enable org.rust.cargo.evaluate.build.scripts and org.rust.macros.proc experimental features

  • #8297 Fix default parameters handling in Wrong number of type arguments inspection

  • #8279 Fix resolve of imports inside detached files

  • #8269 Correctly parenthesize block-like expressions (e.g. match) in Inline Variable refactoring (by @Kobzol)

  • #8268 Fix type inference if there are dependencies named the same as stdlib crates

  • #8263 Infer generic parameter types in Convert closure to function intention (by @Kobzol)

  • #8230 Introduce local variable refactoring no longer moves the new binding into closure bodies if it is used outside of them (by @afetisov)

  • #8228 Do not offer the Add remaining patterns quick-fix when pattern matching on an enum marked with #[non_exhaustive] if there are no wildcard arms in the match expression (by @Kobzol)

  • #8216 Support usages in serde string attributes like #[serde(default = "path")] in Unused import inspection. Note, the inspection is disabled by default and can be enabled in the inspection settings

  • #8187 Support indirect self-references in Move refactoring (Refactor | Move or F6)

  • #8185 Fix handling comments in Invert if condition intention

  • #8165 Fix Invert if condition intention when there is return/continue without semicolon

  • #8133 Fix rename quick-fix for module declaration by Module naming convention inspection

  • #7906 Fix Run with Coverage for projects located on WSL file system

  • #7814 Handle qualified field paths correctly in Generate constructor (Code | Generate | Constructor) refactoring (by @Kobzol)

  • #7562 Don’t hang on build when an incorrect path is used with Redirect Input from option

  • #8382 Fix stuck external linter errors

Internal Improvements

  • #8363 Set up dependabot to update gradle dependencies automatically

  • #8316 Always generate Java-compatible byte code for interface methods with default implementation without @JvmDefault annotation

  • #8310 Update Kotlin language version to 1.6 and API version to 1.5. So now we can use new language features from Kotlin 1.6 and all API added in Kotlin 1.5

  • #8247 Make 2021 default edition in tests

  • #8175 Enable procedural macro expansion in regression tests

Full set of changes can be found here