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 crateanduseitems 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 variableannotation - Make various improvements of
cargo checkexternal annotator:- Show progress indicator when
cargo checkis running - Don’t provide outdated or duplicate errors
- Introduce
Toggle Cargo checkaction to quickly enable/disablecargo checkannotator - Take into account
Offline modesetting
- Show progress indicator when
-
Add new formatters for GDB. They support rendering of
Rc,Arc,CellandRefCellstructs 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
asyncblocks, functions and lambdas -
Add quick fix to create lifetime parameter from usage (by @sirgl)

-
Provide
dbgpostfix completion
-
Allow installing
clippyfrom 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 clippyaction -
Infer type of box expressions like
box Fooand box patterns likelet Foo { box x } = expr -
Show
Experimental featureerror annotations forirrefutable let patterns,box expressionandbox patternsfeatures -
Implement special support for
Serialize,DeserializeandFailtraits fromserdeandfailurecrates respectively. Now they can be correctly resolved and suggested inderiveattribute. - Support focus mode for Rust files
Fixes
-
Prevent showing annoying
File not found for moduleerror annotation for incomplete code - Various
Auto Importquick 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
useitem 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 letandif letexpressions -
Allow extracting a function from a single expression
- Macro expansion improvements:
show macro expansionaction shows error balloon if it failed to expand macro- Expand macros in statement context
- Correctly expand macro with
$cratemetavar 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
asyncfunctions anduseitems - Provide
New | Rust fileaction 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