silence unused m variable warning in #[hdl_module] with an empty body.

This commit is contained in:
Jacob Lifshay 2025-03-27 23:17:28 -07:00
parent ec3a61513b
commit e0f978fbb6
Signed by: programmerjake
SSH key fingerprint: SHA256:HnFTLGpSm4Q4Fj502oCFisjZSoakwEuTsJJMSke63RQ

View file

@ -377,7 +377,7 @@ impl ModuleFn {
module_kind, module_kind,
vis, vis,
sig, sig,
block, mut block,
struct_generics, struct_generics,
the_struct, the_struct,
} = match self.0 { } = match self.0 {
@ -439,6 +439,12 @@ impl ModuleFn {
body_sig body_sig
.inputs .inputs
.insert(0, parse_quote! { m: &::fayalite::module::ModuleBuilder }); .insert(0, parse_quote! { m: &::fayalite::module::ModuleBuilder });
block.stmts.insert(
0,
parse_quote! {
let _ = m;
},
);
let body_fn = ItemFn { let body_fn = ItemFn {
attrs: vec![], attrs: vec![],
vis: Visibility::Inherited, vis: Visibility::Inherited,