Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
DNM: Temporarily require call_index
Browse files Browse the repository at this point in the history
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
  • Loading branch information
ggwpez committed Dec 9, 2022
1 parent f31bbeb commit c4934e3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions frame/support/procedural/src/pallet/parse/call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit c4934e3

Please sign in to comment.