rust-analyzer/crates/ide_completion/src
bors[bot] f5c069c9d9
Merge #11894
11894: complete pattern args based on type name r=Veykril a=cameron1024

Addresses #11892 

Changes function argument completion to cover a case like this:
```rust
struct Foo { bar: i32 }

fn qux(Foo { bar }: Foo) {
  println!("{bar}");
}
```
When completing the function call for `qux`, instead of expanding to `qux(_)`, it will now expand to `qux(foo)` (based on the snake-cased version of the name of the ADT)

Non ADTs are unaffected


Co-authored-by: cameron <cameron.studdstreet@gmail.com>
Co-authored-by: cameron1024 <cameron.studdstreet@gmail.com>
2022-04-04 13:06:51 +00:00
..
completions add test for postfix completion relevance 2022-04-03 12:13:26 +01:00
render fix type error 2022-04-04 14:30:49 +01:00
tests suggest infered type in auto complete 2022-04-03 11:17:33 +04:30
completions.rs suggest infered type in auto complete 2022-04-03 11:17:33 +04:30
config.rs internal: Re-arrange ide_db modules 2022-03-06 19:04:04 +01:00
context.rs internal: Enforce Resolver to always have a module scope 2022-03-31 11:12:08 +02:00
item.rs suggest infered type in auto complete 2022-04-03 11:17:33 +04:30
lib.rs suggest infered type in auto complete 2022-04-03 11:17:33 +04:30
patterns.rs suggest infered type in auto complete 2022-04-03 11:17:33 +04:30
render.rs add test for postfix completion relevance 2022-04-03 12:13:26 +01:00
snippet.rs Simplify completion import insertion 2022-04-02 01:42:21 +02:00
tests.rs Simplify completion import insertion 2022-04-02 01:42:21 +02:00