diff --git a/crates/gen-rust-wasm/src/lib.rs b/crates/gen-rust-wasm/src/lib.rs index 2667a9922..d3c7a6722 100644 --- a/crates/gen-rust-wasm/src/lib.rs +++ b/crates/gen-rust-wasm/src/lib.rs @@ -159,8 +159,10 @@ impl Generator for RustWasm { self.trait_name = iface.name.to_camel_case(); if !self.opts.standalone { - self.src - .push_str(&format!("mod {} {{\n", iface.name.to_snake_case())); + self.src.push_str(&format!( + "#[allow(clippy::all)]\nmod {} {{\n", + iface.name.to_snake_case(), + )); } self.sizes.fill(iface); diff --git a/crates/gen-wasmtime/src/lib.rs b/crates/gen-wasmtime/src/lib.rs index 6cf1360bb..84016a1a4 100644 --- a/crates/gen-wasmtime/src/lib.rs +++ b/crates/gen-wasmtime/src/lib.rs @@ -311,8 +311,10 @@ impl Generator for Wasmtime { self.types.analyze(iface); self.in_import = variant == AbiVariant::GuestImport; self.trait_name = iface.name.to_camel_case(); - self.src - .push_str(&format!("pub mod {} {{\n", iface.name.to_snake_case())); + self.src.push_str(&format!( + "#[allow(clippy::all)]\npub mod {} {{\n", + iface.name.to_snake_case(), + )); self.src .push_str("#[allow(unused_imports)]\nuse wit_bindgen_wasmtime::{wasmtime, anyhow};\n"); self.sizes.fill(iface);