|
| 1 | +--- |
| 2 | +layout: post |
| 3 | +title: "IntelliJ Rust Changelog #194" |
| 4 | +date: 2023-05-08 13:00:00 +0300 |
| 5 | +--- |
| 6 | + |
| 7 | + |
| 8 | +## New Features |
| 9 | + |
| 10 | +* Detect new compiler errors: |
| 11 | + |
| 12 | + * [#10406] The `not` cfg-predicate was malformed [E0536](https://doc.rust-lang.org/error_codes/E0536.html) |
| 13 | + |
| 14 | + * [#10387] A non-ident or non-wildcard pattern has been used as a parameter of a function pointer type [E0561](https://doc.rust-lang.org/error_codes/E0561.html) |
| 15 | + |
| 16 | + * [#10399] `async` non-`move` closures with parameters are currently not supported [E0708](https://doc.rust-lang.org/error_codes/E0708.html) |
| 17 | + |
| 18 | + * [#10361] Variadic parameters have been used on a non-C ABI function [E0045](https://doc.rust-lang.org/error_codes/E0045.html) |
| 19 | + |
| 20 | +* [#10315] Support extracting code containing control flow in [`Extract function`](https://plugins.jetbrains.com/plugin/8182-rust/docs/rust-refactorings.html#extractmethod-refactoring) refactoring (`Refactor | Extract Method` or <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>M</kbd>) |
| 21 | + |
| 22 | + {% include gif-img.html path="/assets/posts/changelog-194/extract_function_control_flow" w="700px" %} |
| 23 | + |
| 24 | +* [#9219] Adjust new Rust project generator to new project wizard in IDEA |
| 25 | + |
| 26 | + <img src="/assets/posts/changelog-194/new_project_wizard.png" width="700px"/> |
| 27 | + |
| 28 | +* [#10398] Highlight constants and statics differently to visually distinguish them. |
| 29 | + You can change the corresponding highlighting via `Preferences | Editor | Color Scheme | Rust` settings |
| 30 | + |
| 31 | + <img src="/assets/posts/changelog-194/static_const.png" width="350px"/> |
| 32 | + |
| 33 | +* [#10359] Annotate built-in attributes (by [@kuksag]) |
| 34 | + |
| 35 | + * Check that the proper delimiter is applied when specifying an attribute |
| 36 | + |
| 37 | + * Check that attribute format is conforming with the respective template |
| 38 | + |
| 39 | + * Check that no literal suffixes are used when specifying an attribute |
| 40 | + |
| 41 | + * Check if an attribute is used multiple times on the same item |
| 42 | + |
| 43 | +* [#9551] Allow to configure the channel and environment variables for external linters. You can configure it in `Settings | Languages & Frameworks | Rust | External Linters` |
| 44 | + |
| 45 | +* [#9287] Enable Debugger, Profiler, Valgrind, Code Coverage, and Build/Test tool windows for `bench` command (CLion only). |
| 46 | + Note, default bench profile doesn't contain debuginfo. You have to use, for example, `dev` profile (add `--profile=dev` to your command) |
| 47 | + |
| 48 | +* [#8161] Allow loading NatVis debugger renderers when using MSVC toolchain on Windows |
| 49 | + |
| 50 | +* [#8207] Add an experimental option to use source-based coverage |
| 51 | + |
| 52 | +* [#8087] Add a quick-fix for [type mismatch E0308](https://doc.rust-lang.org/error-index.html#E0308) error that adds a `#[repr(...)]` attribute to an enum: (by [@serid]) |
| 53 | + |
| 54 | +## Fixes |
| 55 | + |
| 56 | +* [#10410] Parse and expand macros in attributes: `#[doc = foo!()]` |
| 57 | + |
| 58 | +* [#10367] Properly build local crate index to provide completion of crate names and version in `Cargo.toml` after collapsing cargo git crate index into one commit |
| 59 | + |
| 60 | +* [#8147] Render const generics in quick docs and inline hints |
| 61 | + |
| 62 | +* [#9254] Fix `Needless lifetimes` inspection in case of async functions |
| 63 | + |
| 64 | +* [#9740] Support smart enter for type aliases |
| 65 | + |
| 66 | +* [#8762] Fix running build if Cargo project is in a subdirectory |
| 67 | + |
| 68 | +* [#10382] Fix formatting and links in descriptions of some intentions and inspections |
| 69 | + |
| 70 | +* [#10396] Reduce the error scope for E0130, E0561 and E0642 compiler errors from value parameter to pattern |
| 71 | + |
| 72 | +* [#8908] Fix a bug when applying changes to multiple configurable (e.g. `Rust` and `Cargo`) at once |
| 73 | + |
| 74 | +* [#7917] Fixes [`E0518`](https://doc.rust-lang.org/error-index.html#E0518) error detection when there is cfg-disabled import of `inline` proc macro |
| 75 | + |
| 76 | +* [#7141] Fix completion of derive proc macro with `doc(hidden)` attribute in imports |
| 77 | + |
| 78 | +* [#10380] Fix showing error when assigning value to union field outside unsafe block |
| 79 | + |
| 80 | +* [#9948] Allow cargo packages installed via `cargo install --path` (by [@joshuataylor]) |
| 81 | + |
| 82 | +* [#10361] Don't show error `function cannot be variadic` when use default ABI |
| 83 | + |
| 84 | +## Internal Improvements |
| 85 | + |
| 86 | +* [#10389] Extend MIR support with most basic cases (by [@LebedevEA]) |
| 87 | + |
| 88 | +* [#10388] Migrate tests to JUnit4 |
| 89 | + |
| 90 | +* [#10146] Generate info about built-in attributes |
| 91 | + |
| 92 | +Full set of changes can be found [here](https://github.com/intellij-rust/intellij-rust/milestone/103?closed=1) |
| 93 | + |
| 94 | +[@LebedevEA]: https://github.com/LebedevEA |
| 95 | +[@joshuataylor]: https://github.com/joshuataylor |
| 96 | +[@kuksag]: https://github.com/kuksag |
| 97 | +[@serid]: https://github.com/serid |
| 98 | + |
| 99 | +[#7141]: https://github.com/intellij-rust/intellij-rust/pull/7141 |
| 100 | +[#7917]: https://github.com/intellij-rust/intellij-rust/pull/7917 |
| 101 | +[#8087]: https://github.com/intellij-rust/intellij-rust/pull/8087 |
| 102 | +[#8147]: https://github.com/intellij-rust/intellij-rust/pull/8147 |
| 103 | +[#8161]: https://github.com/intellij-rust/intellij-rust/pull/8161 |
| 104 | +[#8207]: https://github.com/intellij-rust/intellij-rust/pull/8207 |
| 105 | +[#8762]: https://github.com/intellij-rust/intellij-rust/pull/8762 |
| 106 | +[#8908]: https://github.com/intellij-rust/intellij-rust/pull/8908 |
| 107 | +[#9219]: https://github.com/intellij-rust/intellij-rust/pull/9219 |
| 108 | +[#9254]: https://github.com/intellij-rust/intellij-rust/pull/9254 |
| 109 | +[#9287]: https://github.com/intellij-rust/intellij-rust/pull/9287 |
| 110 | +[#9551]: https://github.com/intellij-rust/intellij-rust/pull/9551 |
| 111 | +[#9740]: https://github.com/intellij-rust/intellij-rust/pull/9740 |
| 112 | +[#9948]: https://github.com/intellij-rust/intellij-rust/pull/9948 |
| 113 | +[#10146]: https://github.com/intellij-rust/intellij-rust/pull/10146 |
| 114 | +[#10315]: https://github.com/intellij-rust/intellij-rust/pull/10315 |
| 115 | +[#10359]: https://github.com/intellij-rust/intellij-rust/pull/10359 |
| 116 | +[#10361]: https://github.com/intellij-rust/intellij-rust/pull/10361 |
| 117 | +[#10367]: https://github.com/intellij-rust/intellij-rust/pull/10367 |
| 118 | +[#10380]: https://github.com/intellij-rust/intellij-rust/pull/10380 |
| 119 | +[#10382]: https://github.com/intellij-rust/intellij-rust/pull/10382 |
| 120 | +[#10385]: https://github.com/intellij-rust/intellij-rust/pull/10385 |
| 121 | +[#10387]: https://github.com/intellij-rust/intellij-rust/pull/10387 |
| 122 | +[#10388]: https://github.com/intellij-rust/intellij-rust/pull/10388 |
| 123 | +[#10389]: https://github.com/intellij-rust/intellij-rust/pull/10389 |
| 124 | +[#10392]: https://github.com/intellij-rust/intellij-rust/pull/10392 |
| 125 | +[#10396]: https://github.com/intellij-rust/intellij-rust/pull/10396 |
| 126 | +[#10398]: https://github.com/intellij-rust/intellij-rust/pull/10398 |
| 127 | +[#10399]: https://github.com/intellij-rust/intellij-rust/pull/10399 |
| 128 | +[#10406]: https://github.com/intellij-rust/intellij-rust/pull/10406 |
| 129 | +[#10408]: https://github.com/intellij-rust/intellij-rust/pull/10408 |
| 130 | +[#10410]: https://github.com/intellij-rust/intellij-rust/pull/10410 |
0 commit comments