mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-01 03:07:56 +00:00
Forbid stray tokens in call index (#13036)
* Check for call_index * fixes * pallet ui test for weight attribute * Update frame/support/procedural/src/pallet/parse/call.rs Co-authored-by: Bastian Köcher <git@kchr.de> * fix * small fix * wrong return type * ... * . * final fix * update .stderr * commit * udpate * Update frame/support/procedural/src/pallet/parse/call.rs Co-authored-by: Bastian Köcher <git@kchr.de> * update .stderr Co-authored-by: Bastian Köcher <git@kchr.de>
This commit is contained in:
@@ -93,6 +93,10 @@ impl syn::parse::Parse for FunctionAttr {
|
||||
let call_index_content;
|
||||
syn::parenthesized!(call_index_content in content);
|
||||
let index = call_index_content.parse::<syn::LitInt>()?;
|
||||
if !index.suffix().is_empty() {
|
||||
let msg = "Number literal must not have a suffix";
|
||||
return Err(syn::Error::new(index.span(), msg))
|
||||
}
|
||||
Ok(FunctionAttr::CallIndex(index.base10_parse()?))
|
||||
} else {
|
||||
Err(lookahead.error())
|
||||
|
||||
Reference in New Issue
Block a user