IntelliJ Rust Changelog #92
New Features
-
Suggest items that are not in scope while completion. Now you don’t need to remember where the necessary item is located and even the precise name of this item. You just need to start typing item’s name and then select it from a suggested list. The corresponding
extern crate
anduse
items will be inserted automatically. Special thanks to @Riateche for trying a nightly version of this feature and the corresponding feedback. It helped us to find out and fix some bugs before this release -
Show
Use of possibly uninitialized variable
annotation - Make various improvements of
cargo check
external annotator:- Show progress indicator when
cargo check
is running - Don’t provide outdated or duplicate errors
- Introduce
Toggle Cargo check
action to quickly enable/disablecargo check
annotator - Take into account
Offline mode
setting
- Show progress indicator when
-
Add new formatters for GDB. They support rendering of
Rc
,Arc
,Cell
andRefCell
structs in addition to standard formatters provided byrustup
. Also, they should fix some bugs in string displaying. You can disable them or switch to default ones inPreferences | Build, Execution, Deployment | Debugger | Data Views | Rust
-
Support type inference for
async
blocks, functions and lambdas -
Add quick fix to create lifetime parameter from usage (by @sirgl)
-
Provide
dbg
postfix completion -
Allow installing
clippy
from IDE if it’s not installed. In case if you don’t haveclippy
, the plugin will suggest to install it in one click, when you launchRun clippy
action -
Infer type of box expressions like
box Foo
and box patterns likelet Foo { box x } = expr
-
Show
Experimental feature
error annotations forirrefutable let patterns
,box expression
andbox patterns
features -
Implement special support for
Serialize
,Deserialize
andFail
traits fromserde
andfailure
crates respectively. Now they can be correctly resolved and suggested inderive
attribute. - Support focus mode for Rust files
Fixes
-
Prevent showing annoying
File not found for module
error annotation for incomplete code - Various
Auto Import
quick fix improvements:- Do not provide the quick fix for names which are already in scope. It’s mostly helpful
when an item is already imported but cannot be resolved because code is incomplete (like
let map = HashMap
) - Correctly import items re-exported via
use
item with a wildcard likepub use core::future::*
- Make the quick fix works for paths with type params like
let map = HashMap::<i32, i32>
- Do not suggest to import the same trait several times when the quick fix is available for trait method. It also improves name resolution of trait methods in cases when the corresponding trait is not in scope.
- Do not provide the quick fix for names which are already in scope. It’s mostly helpful
when an item is already imported but cannot be resolved because code is incomplete (like
-
Slightly improve completion performance
-
Improve type inference of patterns in
for
,while let
andif let
expressions -
Allow extracting a function from a single expression
- Macro expansion improvements:
show macro expansion
action shows error balloon if it failed to expand macro- Expand macros in statement context
- Correctly expand macro with
$crate
metavar inside a group - Support keywords as metavar names
-
Save all documents before running any external process from a run configuration. It should prevent invoking cargo on outdated sources
-
Provide proper documentation link for renamed dependencies in
Cargo.toml
(by @bc-lee) -
Do not show extra line markers after a syntax error
-
Improve parsing of
async
functions anduse
items - Provide
New | Rust file
action only inside Cargo project directory
Internal Improvements
-
Update IDEA, CLion, gradle & kotlin
-
Update kotlin language and API versions to 1.3. So now it’s possible to use all new features from kotlin 1.3 for the plugin implementation