IntelliJ Rust Changelog #160
New Features
-
#7996 Enable crates local index on stable to provide analysis for dependencies inside
Cargo.toml
manifest. Currently, it offers completions forcrates.io
dependencies’ names and versions, and automatically updates with cargo crates index updates -
#8031 Add
Merge `if`s
intention -
#8030 Add
Condition of 'if' expression is constant
inspection which works for both alwaystrue
and alwaysfalse
if-conditions. TheRedundant else
inspection now checks only irrefutable patterns. -
#7900 Resolve references to
Index
trait implementations for brackets ([
,]
) inside indexing expressions (by @Kobzol) -
#7826 Add intention to unwrap a (tuple struct or enum variant) constructor from a single expression. Could be useful when you’re adding or removing
Option
orResult
from function signatures during refactoring (by @Kobzol) -
#7799 Support if let guard syntax
-
#7725 Take into account all kinds of items generated by custom derive procedural macros. Previously only
impl
blocks were accounted. Please, note that procedural macro expansion is experimental. If you want to try it, enableorg.rust.cargo.evaluate.build.scripts
andorg.rust.macros.proc
experimental features -
#8102 Enable
Change signature
refactoring when a type of a trait method parameter changes (by @Kobzol) -
#7840 The intention for removing braces from a single expression now also works for blocks that contain a single statement (by @Kobzol)
-
#7719 Support the E0451 compiler error (“a struct constructor with private fields was invoked”) for struct field literals using shorthand init (by @Kobzol)
Performance Improvements
-
#8089 Avoid using potentially long-running computation inside the UI thread when invoking the
Introduce constant
refactoring (by @Kobzol) -
#8043 Do not use potentially long-running operations on the UI thread in the
Change signature
refactoring (by @Kobzol)
Fixes
-
Build script evaluation fixes. Note, build script evaluation is disabled by default. To turn it on, enable
org.rust.cargo.evaluate.build.scripts
experimental feature:-
#8012 Improve work with generated by build scripts. Now the plugin doesn’t pollute
Project Structure
view with entries for generatedout
directories. Also, the custom paths of target directories are also supported -
#8056 Fix build script evaluation in workspace. Now, the plugin properly evaluates scripts in all packages of the workspace
-
-
#8058 Resolve an associated type to a trait if the plugin doesn’t sure about the concrete
impl
. This should fix a lot of errors related to type inference. -
#8080 Render parentheses for type references in
Implement Members
refactoring -
#8017 Fix DeMorgan’s law intention for multiple boolean operators and incorrectly omitted parens
-
#7959 Handle name collisions in
Introduce Constant
refactoring (by @Kobzol) -
#7775
Introduce variable
: place new variable in lambda block when target expression is in lambda without braces (by @t-kameyama) -
#7770
Add remaining patterns
quick-fix: add patterns even if nomatch
body (by @t-kameyama) -
#8123 Fix exception during debugging in IDEA 2021.3
Internal Improvements
-
#8098 Prevent future runtime errors during project opening because of incompatibility changes in future IDE versions
-
#8010 Annotate some code with
@Nls
and@NlsContexts
annotations as part of preparations for localization -
#7713 Speed up toolchain tests by caching some values from
rustc
andcargo
Full set of changes can be found here