rust/crates/ide
bors[bot] 9d3483a74d
Merge #5846
5846: Add references to fn args during completion r=matklad a=adamrk

When completing a function call, if there is an argument taken as a ref or mut ref which matches the name and type of a variable in scope, we will insert a `&` or `&mut` when filling in the function arguments. This addresses https://github.com/rust-analyzer/rust-analyzer/issues/5449.

E.g. 
```rust
fn foo(x: &i32) {}
fn main() {
  let x = 5;
  foo # completing foo here generates `foo(&x)` now instead of `foo(x)`
}
```

Co-authored-by: adamrk <ark.email@gmail.com>
2020-09-24 12:23:28 +00:00
..
src Merge #5846 2020-09-24 12:23:28 +00:00
Cargo.toml ⬆️ expect-test 2020-08-28 14:47:14 +02:00