Repository: paritytech/substrate
File: frame/support/procedural/src/construct_runtime/mod.rs (Rust)

Code before:
		let type_decl = quote!(
			pub type #type_name = #pallet::Pallet <#(#generics),*>;
		);
		types.extend(type_decl);
		names.push(&pallet_declaration.name);
	}

	let system_pallet = match names.iter().find(|n| **n == SYSTEM_PALLET_NAME) {
		Some(name) => name,
		None =>
			return syn::Error::new(
				proc_macro2::Span::call_site(),
				"`System` pallet declaration is missing. \
					 Please add this line: `System: frame_system::{Pallet, Call, Storage, Config, Event<T>},`",
			)
			.into_compile_error(),
	};

	let names_without_system =
		names.iter().filter(|n| **n != SYSTEM_PALLET_NAME).collect::<Vec<_>>();
	let names_reversed = names.clone().into_iter().rev().collect::<Vec<_>>();
	let names_without_system_reverse =
		names_without_system.clone().into_iter().rev().collect::<Vec<_>>();
	let names_reversed_with_system_first = std::iter::once(system_pallet)
		.chain(names_without_system_reverse.clone().into_iter())
		.collect::<Vec<_>>();

	quote!(
		#types

		/// All pallets included in the runtime as a nested tuple of types.
		#[deprecated(note = "The type definition has changed from representing all pallets \
			excluding system, in reversed order to become the representation of all pallets \
			including system pallet in regular order. For this reason it is encouraged to use \
			explicitly one of `AllPalletsWithSystem`, `AllPalletsWithoutSystem`, \
			`AllPalletsWithSystemReversed`, `AllPalletsWithoutSystemReversed`. \
			Note that the type `frame_executive::Executive` expects one of `AllPalletsWithSystem` \
			, `AllPalletsWithSystemReversed`, `AllPalletsReversedWithSystemFirst`. More details in \
			https://github.com/paritytech/substrate/pull/10043")]
		pub type AllPallets = AllPalletsWithSystem;

		/// All pallets included in the runtime as a nested tuple of types.
		pub type AllPalletsWithSystem = ( #(#names),* );

		/// All pallets included in the runtime as a nested tuple of types.
		/// Excludes the System pallet.
		pub type AllPalletsWithoutSystem = ( #(#names_without_system),* );

		/// All pallets included in the runtime as a nested tuple of types in reversed order.
		/// Excludes the System pallet.
		pub type AllPalletsWithoutSystemReversed =( #(#names_without_system_reverse),* );

Review comment (suggestion):
```suggestion
	let all_pallets_without_system =
		names.iter().filter(|n| **n != SYSTEM_PALLET_NAME).collect::<Vec<_>>();
```

Code after:
		let type_decl = quote!(
			pub type #type_name = #pallet::Pallet <#(#generics),*>;
		);
		types.extend(type_decl);
		names.push(&pallet_declaration.name);
	}

	let system_pallet = match names.iter().find(|n| **n == SYSTEM_PALLET_NAME) {
		Some(name) => name,
		None =>
			return syn::Error::new(
				proc_macro2::Span::call_site(),
				"`System` pallet declaration is missing. \
					 Please add this line: `System: frame_system::{Pallet, Call, Storage, Config, Event<T>},`",
			)
			.into_compile_error(),
	};

	let names_without_system =
		names.iter().filter(|n| **n != SYSTEM_PALLET_NAME).collect::<Vec<_>>();
	let names_reversed = names.clone().into_iter().rev().collect::<Vec<_>>();
	let names_without_system_reverse =
		names_without_system.clone().into_iter().rev().collect::<Vec<_>>();
	let names_reversed_with_system_first = std::iter::once(system_pallet)
		.chain(names_without_system_reverse.clone().into_iter())
		.collect::<Vec<_>>();

	quote!(
		#types

		/// All pallets included in the runtime as a nested tuple of types.
		#[deprecated(note = "The type definition has changed from representing all pallets \
			excluding system, in reversed order to become the representation of all pallets \
			including system pallet in regular order. For this reason it is encouraged to use \
			explicitly one of `AllPalletsWithSystem`, `AllPalletsWithoutSystem`, \
			`AllPalletsWithSystemReversed`, `AllPalletsWithoutSystemReversed`. \
			Note that the type `frame_executive::Executive` expects one of `AllPalletsWithSystem` \
			, `AllPalletsWithSystemReversed`, `AllPalletsReversedWithSystemFirst`. More details in \
			https://github.com/paritytech/substrate/pull/10043")]
		pub type AllPallets = AllPalletsWithSystem;

		/// All pallets included in the runtime as a nested tuple of types.
		pub type AllPalletsWithSystem = ( #(#names),* );

		/// All pallets included in the runtime as a nested tuple of types.
		/// Excludes the System pallet.
		pub type AllPalletsWithoutSystem = ( #(#names_without_system),* );

		/// All pallets included in the runtime as a nested tuple of types in reversed order.
		/// Excludes the System pallet.
		#[deprecated(note = "Using reverse pallet orders is deprecated. use only \