rust/crates/ide/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
..
completion Merge #5846 2020-09-24 12:23:28 +00:00
diagnostics Minor 2020-08-18 16:22:01 +02:00
display Switch to expect_test from crates.io 2020-08-21 13:19:31 +02:00
references Switch to expect_test from crates.io 2020-08-21 13:19:31 +02:00
syntax_highlighting Fix handling of consuming self, refactor shared logic into a single function 2020-09-06 14:34:01 -04:00
typing Rename ra_ide -> ide 2020-08-13 17:58:27 +02:00
call_hierarchy.rs Rename ra_ide -> ide 2020-08-13 17:58:27 +02:00
call_info.rs Use the same abstraction for attrs and docs 2020-08-25 12:13:31 +02:00
completion.rs Finally cretae the mod completion module 2020-09-10 01:42:20 +03:00
diagnostics.rs Update tests 2020-09-16 17:26:51 +02:00
display.rs inline parameters for a function description #6002 2020-09-15 18:04:34 +02:00
expand_macro.rs Switch to expect_test from crates.io 2020-08-21 13:19:31 +02:00
extend_selection.rs Rename ra_ide -> ide 2020-08-13 17:58:27 +02:00
file_structure.rs Switch to expect_test from crates.io 2020-08-21 13:19:31 +02:00
folding_ranges.rs Rename ra_ide -> ide 2020-08-13 17:58:27 +02:00
goto_definition.rs Rename ra_ide -> ide 2020-08-13 17:58:27 +02:00
goto_implementation.rs Rename ra_ide -> ide 2020-08-13 17:58:27 +02:00
goto_type_definition.rs Rename ra_ide -> ide 2020-08-13 17:58:27 +02:00
hover.rs Fix type walking about type of async block 2020-09-12 01:08:50 +08:00
inlay_hints.rs Switch to expect_test from crates.io 2020-08-21 13:19:31 +02:00
join_lines.rs Rename ra_ide -> ide 2020-08-13 17:58:27 +02:00
lib.rs Make MergeBehaviour configurable 2020-09-12 12:11:16 +02:00
link_rewrite.rs Tease apart orthogonal concerns in markdown link rewriting 2020-08-26 20:24:00 +02:00
markup.rs Rename ra_ide -> ide 2020-08-13 17:58:27 +02:00
matching_brace.rs Rename ra_ide -> ide 2020-08-13 17:58:27 +02:00
mock_analysis.rs Merge remote-tracking branch 'upstream/master' into 503-hover-doc-links 2020-08-24 21:20:13 +12:00
parent_module.rs Rename ra_ide -> ide 2020-08-13 17:58:27 +02:00
prime_caches.rs Rename ra_ide -> ide 2020-08-13 17:58:27 +02:00
references.rs Future proof find-usages API 2020-08-19 18:58:48 +02:00
runnables.rs Improve support for code block attributes 2020-08-26 15:55:06 +02:00
status.rs Rename ra_ide -> ide 2020-08-13 17:58:27 +02:00
syntax_highlighting.rs Fix handling of consuming self, refactor shared logic into a single function 2020-09-06 14:34:01 -04:00
syntax_tree.rs Rename ra_ide -> ide 2020-08-13 17:58:27 +02:00
typing.rs Document VS Code setting needed for on-typing assists 2020-09-01 23:40:53 +10:00