Skip to content

fix: offer block .let in ref-expr in match arm#21671

Merged
ChayimFriedman2 merged 1 commit intorust-lang:masterfrom
A4-Tacks:postfix-tree-climbing
Mar 4, 2026
Merged

fix: offer block .let in ref-expr in match arm#21671
ChayimFriedman2 merged 1 commit intorust-lang:masterfrom
A4-Tacks:postfix-tree-climbing

Conversation

@A4-Tacks
Copy link
Copy Markdown
Member

@A4-Tacks A4-Tacks commented Feb 18, 2026

Related #21600, #21594

Example

fn main() {
    match 2 {
        bar => &bar.l$0
    }
}

Before this PR

sn deref         *expr
sn match match expr {}

After this PR

sn deref         *expr
sn let             let
sn letm        let mut
sn match match expr {}

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 18, 2026
@A4-Tacks A4-Tacks force-pushed the postfix-tree-climbing branch from e7d94b2 to fad66cc Compare February 18, 2026 17:35
Example
---
```rust
fn main() {
    match 2 {
        bar => &bar.l$0
    }
}
```

**Before this PR**

```text
sn deref         *expr
sn match match expr {}
```

**After this PR**

```text
sn deref         *expr
sn let             let
sn letm        let mut
sn match match expr {}
```
Comment thread crates/ide-completion/src/completions/postfix.rs
@ChayimFriedman2 ChayimFriedman2 added this pull request to the merge queue Mar 4, 2026
Merged via the queue into rust-lang:master with commit 022f939 Mar 4, 2026
16 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 4, 2026
@A4-Tacks A4-Tacks deleted the postfix-tree-climbing branch March 4, 2026 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants