IntelliJ Rust Changelog #137
New Features
-
Support
Find Usages
action (Edit | Find Usages
or Alt+F7) for Cargo features. Note, in order to make this feature work, you need to update your TOML plugin to the latest version as well cfg
attribute support improvements:-
Provide completion for
feature
argument ofcfg
attribute as well as completion for values of Cargo feature themselves
- Gray out
cfg
-disabled items in structure view - Provide name resolution for Cargo features in
doc(cfg())
attributes - Handle function arguments under
cfg
attribute during type inference and analyses
-
- Support
cfg_attr
attribute in some cases during name resolution and completion. In general, the plugin now knows thatcfg_attr
can be expanded to other attributes, and the following stuff was adapted to use this knowledge:- Resolve and complete paths of
path
attribute and traits inderive
attributes undercfg_attr
- Take into account
cfg_attr
attribute during attribute and lint attribute completion - Resolve procedural macro attributes under
cfg_attr
- Add completion for conditional compilation options and operators inside
cfg_attr()
anddoc(cfg())
attributes - Provide name resolution for Cargo features in conditional attributes like
cfg_attr(docsrs, doc(cfg(feature = "macros")))
- Extend
Attribute without parentheses
inspection scope to highlight attributes undercfg_attr
Note, the plugin can’t evaluate predicates of
cfg_attr
attribute yet - Resolve and complete paths of
- Provide a way to fetch actual info about stdlib packages like dependencies,
edition, Cargo features.
It should help the plugin understand stdlib structure better.
For example, the feature allows providing proper completion and navigation for items defined in
std::os
module. Note, the corresponding feature works since Rust 1.41 and is disabled by default for now. You can enable it viaorg.rust.cargo.fetch.actual.stdlib.metadata
option inExperimental Feature
dialog (Help | Find Action
and typeExperimental features
to open the dialog)
- Add
Redirect input
option forCargo
run configuration to provide stdin from the desired file
- Remove empty
use
groups byOptimize Imports
action (Code | Optimize Imports
or Alt+Cmd+O)
- Provide
Make public
quick-fix for items with restricted visibility likepub(crate)
- Provide completion for
type_length_limit
,windows_subsystem
,panic_handler
,must_use
ignore
,used
,global_allocator
attributes
- Show
Build
tool window forwasm-pack
run configurations iforg.rust.cargo.build.tool.window
experimental feature is enabled
Performance Improvements
- Reduce memory consumption with new name resolution engine.
Note, you can enable the new engine via
Use experimental name resolution engine
option inPreferences | Languages & Frameworks | Rust
settings
Fixes
- Fix
cfg
attributes support in E0023 detection and the corresponding quick-fix.
Create method
intention is no longer offered for types from external or stdlib crates (by @Kobzol)
- Take into account inner attributes like
#![allow(deprecated)]
in trait items duringcfg
attribute evaluation, lint suppression, etc.
- Exclude private items from completion when using new name resolution engine
- Fix wrong name resolution of Cargo features in
cfg_attr
- Use unqualified paths for references to target mod by
Move
(Refactor | Move
or F6) refactoring
- Properly validate DTrace settings before running CPU profiler on macOS
- Make
Item is private
error highlighting range more precise
Full set of changes can be found here