mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
Fix hir for ast::UnionDef
This commit is contained in:
parent
e1c0bdaf75
commit
5fd68b5929
22 changed files with 121 additions and 86 deletions
|
@ -320,7 +320,7 @@ pub struct Struct {
|
|||
|
||||
impl Struct {
|
||||
pub fn module(self, db: &impl DefDatabase) -> Module {
|
||||
Module { id: self.id.0.module(db) }
|
||||
Module { id: self.id.module(db) }
|
||||
}
|
||||
|
||||
pub fn krate(self, db: &impl DefDatabase) -> Option<Crate> {
|
||||
|
@ -369,11 +369,11 @@ pub struct Union {
|
|||
|
||||
impl Union {
|
||||
pub fn name(self, db: &impl DefDatabase) -> Option<Name> {
|
||||
db.struct_data(self.id.into()).name.clone()
|
||||
db.union_data(self.id).name.clone()
|
||||
}
|
||||
|
||||
pub fn module(self, db: &impl DefDatabase) -> Module {
|
||||
Module { id: self.id.0.module(db) }
|
||||
Module { id: self.id.module(db) }
|
||||
}
|
||||
|
||||
pub fn ty(self, db: &impl HirDatabase) -> Ty {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue