rust/crates/hir/src
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
..
semantics Rename ra_hir -> hir 2020-08-13 16:36:55 +02:00
attrs.rs Tease apart orthogonal concerns in markdown link rewriting 2020-08-26 20:24:00 +02:00
code_model.rs Merge #5846 2020-09-24 12:23:28 +00:00
db.rs Rename ra_hir -> hir 2020-08-13 16:36:55 +02:00
diagnostics.rs Rename ra_hir -> hir 2020-08-13 16:36:55 +02:00
from_id.rs Remove AttrDef 2020-08-25 14:44:15 +02:00
has_source.rs synchronizing changes 2020-08-15 02:37:43 +07:00
lib.rs Tease apart orthogonal concerns in markdown link rewriting 2020-08-26 20:24:00 +02:00
semantics.rs Apply suggestions from code review 2020-09-21 15:35:42 +03:00
source_analyzer.rs Rename record_field_pat to record_pat_field 2020-09-10 18:56:04 +02:00