From c4934e312e12af72ca05a8029d7da753a9c99346 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Fri, 9 Dec 2022 18:45:26 +0100 Subject: [PATCH] DNM: Temporarily require call_index Signed-off-by: Oliver Tale-Yazdi --- frame/support/procedural/src/pallet/parse/call.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frame/support/procedural/src/pallet/parse/call.rs b/frame/support/procedural/src/pallet/parse/call.rs index fbca9a52c767c..cb06429da8d9a 100644 --- a/frame/support/procedural/src/pallet/parse/call.rs +++ b/frame/support/procedural/src/pallet/parse/call.rs @@ -235,6 +235,10 @@ impl CallDef { _ => unreachable!("checked during creation of the let binding"), }; + if call_idx_attrs.is_empty() { + return Err(syn::Error::new(method.sig.span(), "Missing call_index")); + } + if call_idx_attrs.len() > 1 { let msg = "Invalid pallet::call, too many call_index attributes given"; return Err(syn::Error::new(method.sig.span(), msg))