Make Node::layout non-optional, defaulting to a shared empty layout

This commit is contained in:
Dennis Kobert
2026-08-11 09:04:08 +00:00
parent 5b02edfd9a
commit 5db7e1816a
7 changed files with 49 additions and 37 deletions

View File

@@ -1702,8 +1702,8 @@ pub(crate) fn generate_node_impl(crate_ident: &CrateIdent, parsed: &ParsedNodeFn
let record_layout_impl = match record.is_some() || routing.is_some() || flip || opaque {
true => quote! {
fn layout(&self) -> Option<&#core_types::record::Layout> {
Some(&self.__layout)
fn layout(&self) -> &#core_types::record::Layout {
&self.__layout
}
},
false => quote!(),