Skip to content

"Remove Unused Parameter" panics on nested call #12784

Closed
@DorianListens

Description

@DorianListens

rust-analyzer version: 0.0.0 (5342f47 2022-07-09)

rustc version: rustc 1.62.0 (a8314ef7d 2022-06-27)

When invoking "Removed Unused Parameter", if there is call to the function within the argument list of another call to the function, the request handler panics, failing the check_disjoint_and_sort(indels) assert.

fn foo(x: i32, <|>y: i32) -> i32 {
    x
}

fn bar() {
    foo(1, foo(2, 3));
}

Expected:

fn foo(x: i32) -> i32 {
    x
}

fn bar() {
    foo(1);
}

Actual:
request handler panicked: assertion failed: check_disjoint_and_sort(indels)

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