Fix hir for ast::UnionDef

This commit is contained in:
Aleksey Kladov 2019-11-25 17:30:50 +03:00
parent e1c0bdaf75
commit 5fd68b5929
22 changed files with 121 additions and 86 deletions

View file

@ -196,17 +196,6 @@ impl StructKind {
}
impl ast::StructDef {
pub fn is_union(&self) -> bool {
for child in self.syntax().children_with_tokens() {
match child.kind() {
T![struct] => return false,
T![union] => return true,
_ => (),
}
}
false
}
pub fn kind(&self) -> StructKind {
StructKind::from_node(self)
}