Skip to content

Commit 907202a

Browse files
Changelog 181 (#165)
1 parent 098ff13 commit 907202a

File tree

3 files changed

+129
-0
lines changed

3 files changed

+129
-0
lines changed
+129
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
---
2+
layout: post
3+
title: "IntelliJ Rust Changelog #181"
4+
date: 2022-10-24 12:50:00 +0300
5+
---
6+
7+
8+
## New Features
9+
10+
* [#9532] Enable [build script] evaluation by default.
11+
Now the plugin builds and executes all build scripts in the project (including build scripts in external dependencies)
12+
during project model loading to create source code generated during compilation and collect information about
13+
generated environment variables and `cfg` options. A typical use case is to generate some code by a build script
14+
and include it via `include!(concat!(env!("OUT_DIR"), "/path_to_generated_file.rs"))`. Now the plugin understands
15+
where generated sources are located and includes them into its own analysis.
16+
Under the hood, build script evaluation uses `cargo check` call modified in a way to compile and execute only
17+
host code (i.e. only build scripts and procedural macros as well as their dependencies). Besides execution of
18+
build scripts code, it also allows the plugin to compile all procedural macro libraries which is required
19+
for procedural macro expansion.
20+
Note, procedural macro expansion is still disabled by default. To turn it on, enable `org.rust.macros.proc`
21+
[experimental] feature.
22+
23+
Read more about build scripts and how to work with them in Rust plugin in the corresponding
24+
[blog post](https://blog.jetbrains.com/rust/2022/10/24/evaluating-build-scripts-in-the-intellij-rust-plugin/)
25+
26+
* [#9239] Support new Cargo features syntax from Rust 1.60.0. See [Rust release blog post] for more info about the
27+
syntax
28+
29+
* [#9429] Add `Inline type alias` refactoring in addition to existing `Substitute type alias` intention
30+
31+
{% include gif-img.html path="/assets/posts/changelog-181/inline" w="600px" %}
32+
33+
* [#9517] Provide code folding for `extern` blocks (`extern "C" { ... }`) (by [@Kobzol])
34+
35+
* [#9459] Resolve and complete items from the stdlib in Rust files which don't belong to a particular Cargo project (detached and [scratch](https://www.jetbrains.com/help/idea/scratches.html) files)
36+
37+
* [#9451] Provide completion for `'static` lifetime (by [@Kobzol])
38+
39+
* [#9443] Add imports for macros by [`Move refactoring`].
40+
Currently, only macros from dependency crates are supported
41+
42+
* [#9433] Take into account return type of some stdlib macros in completion sorting.
43+
For example, now `vec![]` will be bubbled up in the completion list if expected expression type is `Vec`
44+
45+
* [#9502] Annotate usage of `wasm` [external ABI] as experimental
46+
47+
## Performance Improvements
48+
49+
* [#9488] Fix IDE freezing on searching implementation via `Has Implementation` line marker in gutter
50+
51+
* [#9357] Slightly speed up name resolution
52+
53+
## Fixes
54+
55+
* [#9567] Fix possible stack overflow during type inference
56+
57+
* [#9545] Fix name resolution of absolute path when there is `extern crate` with alias
58+
59+
* [#9537] Fix `Attach file to module` quick-fix. Now `File is not included in module tree` bar will disappear after
60+
attaching the file to a module tree as expected
61+
62+
* [#9510] Don't use private re-exports declared in the same crate by `Import` quick-fix
63+
64+
* [#9507] Improve error message for [`E0407`] error
65+
66+
* [#9506] Don't reorder re-exports of legacy macros when optimizing imports
67+
68+
* [#9504] Add imports for return type by [`Change signature`] refactoring properly
69+
70+
* [#9485] Handle [`$crate`] variable during procedural macro expansion properly
71+
72+
* [#9430] Fix inference of types with mixed type/const type arguments
73+
74+
* [#9416] Fix false-positive [E0117] in some cases
75+
76+
* [#9374] Fix nested loop/block labels shadowing
77+
78+
* [#9358] Fix `todo!()` macro type inference
79+
80+
* [#9312], [#9558] Filter out attribute and derive procedural macros in usual macro calls completion
81+
82+
* [#9540] Fix procedural macro expansion cache invalidation. See issue [#9539] for more details
83+
84+
## Internal Improvements
85+
86+
* [#9480] Keep info about compiler features in json instead of generated Kotlin code
87+
88+
Full set of changes can be found [here](https://github.com/intellij-rust/intellij-rust/milestone/90?closed=1)
89+
90+
[@Kobzol]: https://github.com/Kobzol
91+
92+
[#9239]: https://github.com/intellij-rust/intellij-rust/pull/9239
93+
[#9312]: https://github.com/intellij-rust/intellij-rust/pull/9312
94+
[#9357]: https://github.com/intellij-rust/intellij-rust/pull/9357
95+
[#9358]: https://github.com/intellij-rust/intellij-rust/pull/9358
96+
[#9374]: https://github.com/intellij-rust/intellij-rust/pull/9374
97+
[#9416]: https://github.com/intellij-rust/intellij-rust/pull/9416
98+
[#9429]: https://github.com/intellij-rust/intellij-rust/pull/9429
99+
[#9430]: https://github.com/intellij-rust/intellij-rust/pull/9430
100+
[#9433]: https://github.com/intellij-rust/intellij-rust/pull/9433
101+
[#9443]: https://github.com/intellij-rust/intellij-rust/pull/9443
102+
[#9451]: https://github.com/intellij-rust/intellij-rust/pull/9451
103+
[#9459]: https://github.com/intellij-rust/intellij-rust/pull/9459
104+
[#9480]: https://github.com/intellij-rust/intellij-rust/pull/9480
105+
[#9485]: https://github.com/intellij-rust/intellij-rust/pull/9485
106+
[#9488]: https://github.com/intellij-rust/intellij-rust/pull/9488
107+
[#9502]: https://github.com/intellij-rust/intellij-rust/pull/9502
108+
[#9504]: https://github.com/intellij-rust/intellij-rust/pull/9504
109+
[#9506]: https://github.com/intellij-rust/intellij-rust/pull/9506
110+
[#9507]: https://github.com/intellij-rust/intellij-rust/pull/9507
111+
[#9510]: https://github.com/intellij-rust/intellij-rust/pull/9510
112+
[#9517]: https://github.com/intellij-rust/intellij-rust/pull/9517
113+
[#9532]: https://github.com/intellij-rust/intellij-rust/pull/9532
114+
[#9537]: https://github.com/intellij-rust/intellij-rust/pull/9537
115+
[#9540]: https://github.com/intellij-rust/intellij-rust/pull/9540
116+
[#9545]: https://github.com/intellij-rust/intellij-rust/pull/9545
117+
[#9558]: https://github.com/intellij-rust/intellij-rust/pull/9558
118+
[#9567]: https://github.com/intellij-rust/intellij-rust/pull/9567
119+
120+
[build script]: https://doc.rust-lang.org/cargo/reference/build-scripts.html
121+
[experimental]: https://plugins.jetbrains.com/plugin/8182-rust/docs/rust-faq.html#experimental-features
122+
[`Move refactoring`]: https://plugins.jetbrains.com/plugin/8182-rust/docs/rust-refactorings.html#move-refactoring
123+
[#9539]: https://github.com/intellij-rust/intellij-rust/issues/9539
124+
[Rust release blog post]: https://blog.rust-lang.org/2022/04/07/Rust-1.60.0.html#new-syntax-for-cargo-features
125+
[external ABI]: https://doc.rust-lang.org/reference/items/external-blocks.html#abi
126+
[`E0407`]: https://doc.rust-lang.org/error-index.html#E0407
127+
[`$crate`]: https://doc.rust-lang.org/reference/macros-by-example.html#hygiene
128+
[E0117]: https://doc.rust-lang.org/error-index.html#E0117
129+
[`Change signature`]: https://plugins.jetbrains.com/plugin/8182-rust/docs/rust-refactorings.html#change-sign

assets/posts/changelog-181/inline.gif

603 KB
Loading

assets/posts/changelog-181/inline.png

42 KB
Loading

0 commit comments

Comments
 (0)