From a03ef2791eadd93fbcce899997a578cd8f293b7b Mon Sep 17 00:00:00 2001
From: Branislav Kontur <bkontur@gmail.com>
Date: Wed, 31 Jan 2024 14:42:47 +0100
Subject: [PATCH] Addressing Liam's comments from
 https://github.com/paritytech/polkadot-sdk/pull/2657 (#3150)

---
 .../procedural/src/construct_runtime/expand/composite_helper.rs | 2 +-
 substrate/frame/support/procedural/src/lib.rs                   | 2 +-
 .../frame/support/procedural/src/pallet/expand/composite.rs     | 2 +-
 .../frame/support/procedural/src/pallet/parse/composite.rs      | 2 --
 4 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/substrate/frame/support/procedural/src/construct_runtime/expand/composite_helper.rs b/substrate/frame/support/procedural/src/construct_runtime/expand/composite_helper.rs
index c9ae94c7dcd..101a476fb25 100644
--- a/substrate/frame/support/procedural/src/construct_runtime/expand/composite_helper.rs
+++ b/substrate/frame/support/procedural/src/construct_runtime/expand/composite_helper.rs
@@ -86,7 +86,7 @@ pub(crate) fn expand_variant_count(
 		// This is used for pallets without instance support or pallets with instance support when
 		// we don't specify instance:
 		//
-		// ```nocompile
+		// ```
 		// pub struct Pallet<T, I = ()>{..}
 		//
 		// #[pallet::composite_enum]
diff --git a/substrate/frame/support/procedural/src/lib.rs b/substrate/frame/support/procedural/src/lib.rs
index a777a576648..34e68966b82 100644
--- a/substrate/frame/support/procedural/src/lib.rs
+++ b/substrate/frame/support/procedural/src/lib.rs
@@ -1513,7 +1513,7 @@ pub fn origin(_: TokenStream, _: TokenStream) -> TokenStream {
 ///
 /// ```ignore
 /// Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, MaxEncodedLen, TypeInfo,
-/// RuntimeDebug,
+/// RuntimeDebug
 /// ```
 ///
 /// For ease of usage, when no `#[derive]` attributes are found for the enum under
diff --git a/substrate/frame/support/procedural/src/pallet/expand/composite.rs b/substrate/frame/support/procedural/src/pallet/expand/composite.rs
index acfb21f34e9..d449afe8f2a 100644
--- a/substrate/frame/support/procedural/src/pallet/expand/composite.rs
+++ b/substrate/frame/support/procedural/src/pallet/expand/composite.rs
@@ -18,7 +18,7 @@
 use crate::pallet::Def;
 use proc_macro2::TokenStream;
 
-/// Expands `composite_enum` and adds the `VariantCount` implementation for it."
+/// Expands `composite_enum` and adds the `VariantCount` implementation for it.
 pub fn expand_composites(def: &mut Def) -> TokenStream {
 	let mut expand = quote::quote!();
 	let frame_support = &def.frame_support;
diff --git a/substrate/frame/support/procedural/src/pallet/parse/composite.rs b/substrate/frame/support/procedural/src/pallet/parse/composite.rs
index 601f16971f8..a744756234e 100644
--- a/substrate/frame/support/procedural/src/pallet/parse/composite.rs
+++ b/substrate/frame/support/procedural/src/pallet/parse/composite.rs
@@ -91,14 +91,12 @@ pub struct CompositeDef {
 	pub index: usize,
 	/// The composite keyword used (contains span).
 	pub composite_keyword: keyword::CompositeKeyword,
-
 	/// Name of the associated type.
 	pub ident: syn::Ident,
 	/// Type parameters and where clause attached to a declaration of the pallet::composite_enum.
 	pub generics: syn::Generics,
 	/// The span of the pallet::composite_enum attribute.
 	pub attr_span: proc_macro2::Span,
-
 	/// Variant count of the pallet::composite_enum.
 	pub variant_count: u32,
 }
-- 
GitLab