This commit is contained in:
Lukas Wirth 2024-01-15 12:03:31 +01:00
parent 1669344b2a
commit 180e9b2bbf
17 changed files with 175 additions and 168 deletions

View file

@ -440,6 +440,12 @@ impl ast::Struct {
}
}
impl ast::Union {
pub fn kind(&self) -> StructKind {
StructKind::from_node(self)
}
}
impl ast::RecordExprField {
pub fn for_field_name(field_name: &ast::NameRef) -> Option<ast::RecordExprField> {
let candidate = Self::for_name_ref(field_name)?;