diff --git a/substrate/.maintain/frame-umbrella-weight-template.hbs b/substrate/.maintain/frame-umbrella-weight-template.hbs
index 050e74a16d7e7a8163e4cd08f1f3d5bcbcd36582..c99758c41d9d76e788c4be84c1c319e8c72dedb4 100644
--- a/substrate/.maintain/frame-umbrella-weight-template.hbs
+++ b/substrate/.maintain/frame-umbrella-weight-template.hbs
@@ -16,7 +16,7 @@
 #![allow(unused_parens)]
 #![allow(unused_imports)]
 #![allow(missing_docs)]
-#[allow(dead_code)]
+#![allow(dead_code)]
 
 use frame::weights_prelude::*;
 
diff --git a/substrate/.maintain/frame-weight-template.hbs b/substrate/.maintain/frame-weight-template.hbs
index 541f064850a71c9dc06497612991daf0063c4ced..624fc57aa3295f035c49d1b39529a8f1a5a0e377 100644
--- a/substrate/.maintain/frame-weight-template.hbs
+++ b/substrate/.maintain/frame-weight-template.hbs
@@ -16,7 +16,7 @@
 #![allow(unused_parens)]
 #![allow(unused_imports)]
 #![allow(missing_docs)]
-#[allow(dead_code)]
+#![allow(dead_code)]
 
 use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
 use core::marker::PhantomData;