Skip to content

fix: add reference for same name param coerce matches - #23003

Merged
ChayimFriedman2 merged 3 commits into
rust-lang:masterfrom
A4-Tacks:coerce-func-param-comp
Aug 2, 2026
Merged

fix: add reference for same name param coerce matches#23003
ChayimFriedman2 merged 3 commits into
rust-lang:masterfrom
A4-Tacks:coerce-func-param-comp

Conversation

@A4-Tacks

@A4-Tacks A4-Tacks commented Aug 2, 2026

Copy link
Copy Markdown
Member

Example

fn ref_arg(x: &[i32]) {}
fn foo(x: [i32; 2]) {
    ref_ar$0
}

Before this PR

fn ref_arg(x: &[i32]) {}
fn foo(x: [i32; 2]) {
    ref_arg(${1:x});$0
}

After this PR

fn ref_arg(x: &[i32]) {}
fn foo(x: [i32; 2]) {
    ref_arg(${1:&x});$0
}

Example
---
```rust
fn ref_arg(x: &[i32]) {}
fn foo(x: [i32; 2]) {
    ref_ar$0
}
```

**Before this PR**

```rust
fn ref_arg(x: &[i32]) {}
fn foo(x: [i32; 2]) {
    ref_arg(${1:x});$0
}
```

**After this PR**

```rust
fn ref_arg(x: &[i32]) {}
fn foo(x: [i32; 2]) {
    ref_arg(${1:&x});$0
}
```
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 2, 2026
Comment thread crates/ide-completion/src/render/function.rs Outdated
@ChayimFriedman2
ChayimFriedman2 added this pull request to the merge queue Aug 2, 2026
Merged via the queue into rust-lang:master with commit b54a82b Aug 2, 2026
18 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 2, 2026
@A4-Tacks
A4-Tacks deleted the coerce-func-param-comp branch August 3, 2026 05:06
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