mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +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
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue