mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
Merge #11691
11691: feat: Suggest union literals, suggest union fields within an empty union literal r=Veykril a=m0rg-dev Adds a `Union {…}` completion in contexts where a union is expected, expanding to a choice of available fields (if snippets are supported):   Also, adds support for listing possible fields in an empty union literal.   Closes #11568. Co-authored-by: Morgan Thomas <corp@m0rg.dev>
This commit is contained in:
commit
ff7e057dca
5 changed files with 178 additions and 27 deletions
|
@ -9,6 +9,7 @@ pub(crate) mod pattern;
|
|||
pub(crate) mod type_alias;
|
||||
pub(crate) mod struct_literal;
|
||||
pub(crate) mod compound;
|
||||
pub(crate) mod union_literal;
|
||||
|
||||
use hir::{AsAssocItem, HasAttrs, HirDisplay, ScopeDef};
|
||||
use ide_db::{helpers::item_name, RootDatabase, SnippetCap, SymbolKind};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue