From b184bfad7a2dc6a9bf6654a7eec6c68a27c49f70 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Sun, 20 Dec 2020 18:19:23 +0100 Subject: Add completions for patterns --- crates/hir/src/code_model.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'crates/hir') diff --git a/crates/hir/src/code_model.rs b/crates/hir/src/code_model.rs index d6c7e71ea..dbc937e4f 100644 --- a/crates/hir/src/code_model.rs +++ b/crates/hir/src/code_model.rs @@ -511,6 +511,10 @@ impl Struct { db.struct_data(self.id).repr.clone() } + pub fn kind(self, db: &dyn HirDatabase) -> StructKind { + self.variant_data(db).kind() + } + fn variant_data(self, db: &dyn HirDatabase) -> Arc { db.struct_data(self.id).variant_data.clone() } -- cgit v1.2.3