mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
Add completion for struct literal in which all fields are visible.
Fix ide_completion tests. Move 'complete_record_literal' call to the main completion function. Fix a rendering bug when snippet not available. Checks if an expression is expected before adding completion for struct literal. Move 'completion struct literal with private field' test to 'expressions.rs' test file. Update 'expect' tests with new check in 'complete record literal'.
This commit is contained in:
parent
8a8431133e
commit
9beefef8f9
6 changed files with 259 additions and 0 deletions
|
@ -156,6 +156,7 @@ pub fn completions(
|
|||
completions::unqualified_path::complete_unqualified_path(&mut acc, &ctx);
|
||||
completions::dot::complete_dot(&mut acc, &ctx);
|
||||
completions::record::complete_record(&mut acc, &ctx);
|
||||
completions::record::complete_record_literal(&mut acc, &ctx);
|
||||
completions::pattern::complete_pattern(&mut acc, &ctx);
|
||||
completions::postfix::complete_postfix(&mut acc, &ctx);
|
||||
completions::trait_impl::complete_trait_impl(&mut acc, &ctx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue