diff --git a/crates/fayalite-proc-macros-impl/src/hdl_type_common.rs b/crates/fayalite-proc-macros-impl/src/hdl_type_common.rs index 506c153..3f3f817 100644 --- a/crates/fayalite-proc-macros-impl/src/hdl_type_common.rs +++ b/crates/fayalite-proc-macros-impl/src/hdl_type_common.rs @@ -4163,7 +4163,13 @@ impl MakeHdlTypeExpr for ParsedExpr { match self { ParsedExpr::Delimited(expr) => expr.make_hdl_type_expr(context), ParsedExpr::NamedParamConst(expr) => expr.make_hdl_type_expr(context), - ParsedExpr::Other(expr) => (**expr).clone(), + ParsedExpr::Other(expr) => { + let span = expr.span(); + let const_usize = known_items::ConstUsize(span); + parse_quote_spanned! {expr.span()=> + #const_usize::<{ #expr }> + } + } } } }