diff options
author | Jonas Schievink <[email protected]> | 2021-05-21 20:08:06 +0100 |
---|---|---|
committer | Jonas Schievink <[email protected]> | 2021-05-21 20:08:06 +0100 |
commit | 45f4a1e559f11054fd567be24d91b5559b76a397 (patch) | |
tree | 02427f247d4e1ffc55e631c9b8579147c76e4035 /crates/hir_def/src/item_tree | |
parent | edbde25ca2f13ffacfd006ada7b38618d36d97c6 (diff) |
Remove `StructDefKind`
Diffstat (limited to 'crates/hir_def/src/item_tree')
-rw-r--r-- | crates/hir_def/src/item_tree/lower.rs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/crates/hir_def/src/item_tree/lower.rs b/crates/hir_def/src/item_tree/lower.rs index a7ffc6364..91cf75371 100644 --- a/crates/hir_def/src/item_tree/lower.rs +++ b/crates/hir_def/src/item_tree/lower.rs | |||
@@ -228,12 +228,7 @@ impl<'a> Ctx<'a> { | |||
228 | let generic_params = self.lower_generic_params(GenericsOwner::Struct, strukt); | 228 | let generic_params = self.lower_generic_params(GenericsOwner::Struct, strukt); |
229 | let fields = self.lower_fields(&strukt.kind()); | 229 | let fields = self.lower_fields(&strukt.kind()); |
230 | let ast_id = self.source_ast_id_map.ast_id(strukt); | 230 | let ast_id = self.source_ast_id_map.ast_id(strukt); |
231 | let kind = match strukt.kind() { | 231 | let res = Struct { name, visibility, generic_params, fields, ast_id }; |
232 | ast::StructKind::Record(_) => StructDefKind::Record, | ||
233 | ast::StructKind::Tuple(_) => StructDefKind::Tuple, | ||
234 | ast::StructKind::Unit => StructDefKind::Unit, | ||
235 | }; | ||
236 | let res = Struct { name, visibility, generic_params, fields, ast_id, kind }; | ||
237 | Some(id(self.data().structs.alloc(res))) | 232 | Some(id(self.data().structs.alloc(res))) |
238 | } | 233 | } |
239 | 234 | ||