IntelliJ Rust Changelog #137
New Features
-
#6423 Support
Find Usagesaction (Edit | Find Usagesor 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
cfgattribute support improvements:-
#6436, #6444 Provide completion for
featureargument ofcfgattribute as well as completion for values of Cargo feature themselves
- #6467 Gray out
cfg-disabled items in structure view - #6432 Provide name resolution for Cargo features in
doc(cfg())attributes - #6466 Handle function arguments under
cfgattribute during type inference and analyses
-
- Support
cfg_attrattribute in some cases during name resolution and completion. In general, the plugin now knows thatcfg_attrcan be expanded to other attributes, and the following stuff was adapted to use this knowledge:- #6462, #6460 Resolve and complete paths of
pathattribute and traits inderiveattributes undercfg_attr - #6448 Take into account
cfg_attrattribute during attribute and lint attribute completion - #6461 Resolve procedural macro attributes under
cfg_attr - #6445 Add completion for conditional compilation options and operators inside
cfg_attr()anddoc(cfg())attributes - #6434 Provide name resolution for Cargo features in conditional attributes like
cfg_attr(docsrs, doc(cfg(feature = "macros"))) - #6440 Extend
Attribute without parenthesesinspection scope to highlight attributes undercfg_attr
Note, the plugin can’t evaluate predicates of
cfg_attrattribute yet - #6462, #6460 Resolve and complete paths of
-
#6417 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::osmodule. 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.metadataoption inExperimental Featuredialog (Help | Find Actionand typeExperimental featuresto open the dialog) -
#6332 Add
Redirect inputoption forCargorun configuration to provide stdin from the desired file -
#6428 Remove empty
usegroups byOptimize Importsaction (Code | Optimize Importsor Alt+Cmd+O) -
#6421 Provide
Make publicquick-fix for items with restricted visibility likepub(crate) -
#6458 Provide completion for
type_length_limit,windows_subsystem,panic_handler,must_useignore,used,global_allocatorattributes - #5939 Show
Buildtool window forwasm-packrun configurations iforg.rust.cargo.build.tool.windowexperimental feature is enabled
Performance Improvements
- #6426 Reduce memory consumption with new name resolution engine.
Note, you can enable the new engine via
Use experimental name resolution engineoption inPreferences | Languages & Frameworks | Rustsettings
Fixes
-
#6465 Fix
cfgattributes support in E0023 detection and the corresponding quick-fix. -
#6464
Create methodintention is no longer offered for types from external or stdlib crates (by @Kobzol) -
#6453 Take into account inner attributes like
#![allow(deprecated)]in trait items duringcfgattribute evaluation, lint suppression, etc. -
#6435 Exclude private items from completion when using new name resolution engine
-
#6430 Fix wrong name resolution of Cargo features in
cfg_attr -
#6429 Use unqualified paths for references to target mod by
Move(Refactor | Moveor F6) refactoring -
#6427 Properly validate DTrace settings before running CPU profiler on macOS
-
#6421 Make
Item is privateerror highlighting range more precise
Full set of changes can be found here