IntelliJ Rust Changelog #116
New Features
-
#4914 Improve the new macro expansion engine in order to support nested modules declared with macros. Now the plugin provides code completion and other code insight features for crates like
tokio
andasync-std
in proper way. Note that you should enable the new macro expansion engine viaPreferences | Languages & Frameworks | Rust | Expand declarative macros
option. -
#4758 Support custom test attributes like
#[tokio::test]
(by @Kobzol) -
#4710 Add liveness analysis. Now unused local variables are highlighted as unused.
-
#4913 Support impls for trait objects. Now the plugin provides name resolution and completion for items declared in
impl dyn Trait {}
(by @rrevenantt) -
#4734 Experimentally support items generated by build scripts. Recently, we did a first attempt to support build scripts. In this release we’re trying to use compiler output to get info about generated items. The output contains all environment variables generated by a build script, so now we support not only
env!("OUT_DIR")
, but anyenv!("FOO_BAR")
. Also, it brings support ofcfg
options set by a build scripts, e.g.#[cfg(foobar)]
. To turn it on just enableorg.rust.cargo.evaluate.build.scripts
option inExperimental Features
dialog. Note that under the hood it usescargo check
, so this can significantly slow down project import. -
#4952 Support referring to enum variants through type aliases from Rust 1.37
-
#4942, #4946 Comments generated by
Comment with /
action (Ctrl+//Cmd+/) now follow Rustfmt style. You can change this behavior inFile | Settings | Editor | Code Style | Rust | Code Generation
. (by @SeekingMeaning) -
Implement members
quick fix improvements:
Performance Improvements
-
#4925 Function bodies are now skipped by the parser during indexation. This speeds up the indexation process by about 20% and improves macro expansion speed (if you use the experimental expansion engine).
-
#4862 Function bodies are now parsed incrementally. This means that when you’re typing in a function body, only the body will be re-parsed. This can speed up code completion in large documents.
-
#4950 Slightly optimized parser
Fixes
-
#4955 Correctly parse
crate
-qualified paths in tuple struct fields (struct Foo(crate::foo::Bar)
) -
#4939 Fix “Run with coverage” on 2020.1
-
#4932 Take into account type aliases in
Type Info
action (ctrl+P) (by @Kobzol) -
#4919 Show Cargo tool window after attaching a first cargo project
-
#4849 Fix type checking for async blocks
- #4847 Highlighting improvements:
- Fix highlighting blinking on the dark theme
- Don’t incorrectly highlight a variable as primitive type if it has primitive type name like
let i32 = 1;
- Fix highlighting of string literals inside attributes like
#[foo("bar")]
-
#4783 Display
?Sized
trait bound properly forimpl
blocks in structure view (by @rrevenantt) - REPL integration improvements:
Internal Improvements
- #4948 New parser benchmark
Full set of changes can be found here