Skip to content

Commit 3f0e871

Browse files
fix(forge): Add unused_attributes to allow list for generated bindings (#11725)
* Added unused_attributes to allow list for generated bindings * chore: fmt --------- Co-authored-by: Oliver Nordbjerg <hi@notbjerg.me>
1 parent d265a4e commit 3f0e871

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

crates/sol-macro-gen/src/sol_macro_gen.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ edition = "2021"
165165
let mut lib_contents = String::new();
166166
write!(
167167
&mut lib_contents,
168-
r#"#![allow(unused_imports, clippy::all, rustdoc::all)]
168+
r#"#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all)]
169169
//! This module contains the sol! generated bindings for solidity contracts.
170170
//! This is autogenerated code.
171171
//! Do not manually edit these files.
@@ -228,13 +228,14 @@ edition = "2021"
228228

229229
let _ = fs::create_dir_all(bindings_path);
230230

231-
let mut mod_contents = r#"#![allow(unused_imports, clippy::all, rustdoc::all)]
231+
let mut mod_contents =
232+
r#"#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all)]
232233
//! This module contains the sol! generated bindings for solidity contracts.
233234
//! This is autogenerated code.
234235
//! Do not manually edit these files.
235236
//! These files may be overwritten by the codegen system at any time.
236237
"#
237-
.to_string();
238+
.to_string();
238239

239240
for instance in &self.instances {
240241
let name = instance.name.to_snake_case();
@@ -290,7 +291,7 @@ edition = "2021"
290291
let mut super_contents = String::new();
291292
write!(
292293
&mut super_contents,
293-
r#"#![allow(unused_imports, clippy::all, rustdoc::all)]
294+
r#"#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all)]
294295
//! This module contains the sol! generated bindings for solidity contracts.
295296
//! This is autogenerated code.
296297
//! Do not manually edit these files.

0 commit comments

Comments
 (0)