Skip to content

queries(rust): highlight function parameter locals in more places#14352

Closed
nik-rev wants to merge 2 commits intohelix-editor:masterfrom
nik-contrib:highlight-more-rust-params
Closed

queries(rust): highlight function parameter locals in more places#14352
nik-rev wants to merge 2 commits intohelix-editor:masterfrom
nik-contrib:highlight-more-rust-params

Conversation

@nik-rev
Copy link
Contributor

@nik-rev nik-rev commented Aug 31, 2025

test file:

fn x((a, b): !) {
    foo(a, b);
}
fn x(a: !, mut b: !) {
    foo(a, b);
}
fn x((a, mut b): !, mut b: !) {
    foo(a, b);
}
fn x(foo::TupleStruct(a, mut b): !) {
    foo(a, b);
}
fn x(foo::NamedStruct { a, mut b }: !) {
    foo(a, b);
}
fn x(bar::Struct(mut a, b): !) {
    foo(a, b);

    // just to test that it works with closures too
    let m = |bar::Struct(mut c, d): !| {
        bar(c, d);
    };
}
fn x([a, mut b]: !) {
    foo(a, b);
}

split up from #13932

test file:

```rs
fn x((a, b): !) {
    foo(a, b);
}
fn x(a: !, mut b: !) {
    foo(a, b);
}
fn x((a, mut b): !, mut b: !) {
    foo(a, b);
}
fn x(foo::TupleStruct(a, mut b): !) {
    foo(a, b);
}
fn x(foo::NamedStruct { a, mut b }: !) {
    foo(a, b);
}
fn x(bar::Struct(mut a, b): !) {
    foo(a, b);

    // just to test that it works with closures too
    let m = |bar::Struct(mut c, d): !| {
        bar(c, d);
    };
}
fn x([a, mut b]: !) {
    foo(a, b);
}
```

split up from helix-editor#13932
@nik-rev nik-rev closed this Dec 27, 2025
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.

1 participant