diff options
author | Aleksey Kladov <[email protected]> | 2019-11-25 14:30:50 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-11-25 14:50:49 +0000 |
commit | 5fd68b592938b6a4c074146c1b22ea0f6908fe26 (patch) | |
tree | 3403f802366b9ddf9c9e1c1ff59af3d81e476ad1 /crates/ra_hir/src/code_model.rs | |
parent | e1c0bdaf75f8d88a5c28b3e44def17d91d4f46b3 (diff) |
Fix hir for ast::UnionDef
Diffstat (limited to 'crates/ra_hir/src/code_model.rs')
-rw-r--r-- | crates/ra_hir/src/code_model.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs index 534f1f8e9..ae730beb5 100644 --- a/crates/ra_hir/src/code_model.rs +++ b/crates/ra_hir/src/code_model.rs | |||
@@ -320,7 +320,7 @@ pub struct Struct { | |||
320 | 320 | ||
321 | impl Struct { | 321 | impl Struct { |
322 | pub fn module(self, db: &impl DefDatabase) -> Module { | 322 | pub fn module(self, db: &impl DefDatabase) -> Module { |
323 | Module { id: self.id.0.module(db) } | 323 | Module { id: self.id.module(db) } |
324 | } | 324 | } |
325 | 325 | ||
326 | pub fn krate(self, db: &impl DefDatabase) -> Option<Crate> { | 326 | pub fn krate(self, db: &impl DefDatabase) -> Option<Crate> { |
@@ -369,11 +369,11 @@ pub struct Union { | |||
369 | 369 | ||
370 | impl Union { | 370 | impl Union { |
371 | pub fn name(self, db: &impl DefDatabase) -> Option<Name> { | 371 | pub fn name(self, db: &impl DefDatabase) -> Option<Name> { |
372 | db.struct_data(self.id.into()).name.clone() | 372 | db.union_data(self.id).name.clone() |
373 | } | 373 | } |
374 | 374 | ||
375 | pub fn module(self, db: &impl DefDatabase) -> Module { | 375 | pub fn module(self, db: &impl DefDatabase) -> Module { |
376 | Module { id: self.id.0.module(db) } | 376 | Module { id: self.id.module(db) } |
377 | } | 377 | } |
378 | 378 | ||
379 | pub fn ty(self, db: &impl HirDatabase) -> Ty { | 379 | pub fn ty(self, db: &impl HirDatabase) -> Ty { |