Skip to content

Unwrap block assist deletes entire match #18537

Open
@bjorn3

Description

@bjorn3

rust-analyzer version: rust-analyzer version: 0.3.2188-standalone [/home/bjorn/.vscode/extensions/rust-lang.rust-analyzer-0.3.2188-linux-x64/server/rust-analyzer]

rustc version: N/A

editor or extension: VSCode

relevant settings: None

repository link (if public, optional): None

code snippet to reproduce:

fn foo() {
    match (name, mode) {
        (name, mode) => {// <--- cursor is here when using the "Unwrap block" assist
            panic!()
        }
    }
}

turns into

fn foo() {
    panic!()
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions