Skip to content

Commit be2d9e1

Browse files
committed
Changelog #216
1 parent b06466e commit be2d9e1

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed

generated_assists.adoc

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2376,6 +2376,28 @@ fn handle(action: Action) {
23762376
```
23772377

23782378

2379+
[discrete]
2380+
=== `merge_nested_if`
2381+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/merge_nested_if.rs#L11[merge_nested_if.rs]
2382+
2383+
This transforms if expressions of the form `if x { if y {A} }` into `if x && y {A}`
2384+
This assist can only be applied with the cursor on `if`.
2385+
2386+
.Before
2387+
```rust
2388+
fn main() {
2389+
i┃f x == 3 { if y == 4 { 1 } }
2390+
}
2391+
```
2392+
2393+
.After
2394+
```rust
2395+
fn main() {
2396+
if x == 3 && y == 4 { 1 }
2397+
}
2398+
```
2399+
2400+
23792401
[discrete]
23802402
=== `move_arm_cond_to_match_guard`
23812403
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/move_guard.rs#L69[move_guard.rs]
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
= Changelog #216
2+
:sectanchors:
3+
:experimental:
4+
:page-layout: post
5+
6+
Commit: commit:9d8889cdfcc3aa0302353fc988ed21ff9bc9925c[] +
7+
Release: release:2024-01-15[] (`v0.3.1807`)
8+
9+
== New Features
10+
11+
* pr:16209[] (first contribution) add assist to merge nested ``if``s:
12+
+
13+
video::https://user-images.githubusercontent.com/308347/296709371-a674b37c-0d77-487e-9431-e6fac30998ad.mp4[options=loop]
14+
* pr:16308[] use `$crate` for built-in derives.
15+
16+
== Fixes
17+
18+
* pr:16265[] (first contribution) include `pub(crate)` imports in suggestions.
19+
* pr:16348[] fix nested ``include!``s resolving from the wrong base file.
20+
* pr:16312[] fix `rust-analyzer-proc-macro-srv` failing to launch on Windows.
21+
* pr:16277[] fix panic in `generate_delegate_methods`.
22+
* pr:16333[] preserve extracted block comments in "Extract function".
23+
* pr:16310[] fix parsing of method calls on ranges.
24+
* pr:16274[] consider `#[doc(notable_trait)]` for completion relevance.
25+
26+
== Internal Improvements
27+
28+
* pr:16307[] don't store the VFS contents in memory.
29+
* pr:16329[] minor perf and memory improvements.
30+
* pr:16347[] consider all kinds of explicit private imports in `find_path`.
31+
* pr:16319[] differentiate between VFS configuration and file change events.
32+
* pr:16275[] fix `ast::Path::segments` implementation.
33+
* pr:16334[] bump `salsa`.
34+
* pr:16317[] sync from downstream.
35+
* pr:16271[] remove `sysroot-abi` feature flag from `proc-macro-test`.
36+
* pr:16309[] recognize proc macro server unexpectedly quitting and report the exit code.
37+
* pr:16311[] remove the `rustc_dependencies` crate.
38+
* pr:16339[] replace `source_root_crates` output hash set with a slice.

0 commit comments

Comments
 (0)