Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
pkhry committed Jan 8, 2025
1 parent 7a50661 commit c8375d0
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion substrate/primitives/api/proc-macro/src/impl_runtime_apis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,21 @@ impl Parse for RuntimeApiImpls {
uses.push(item)
}
} else {
impls.push(input.parse::<ItemImpl>()?);
match input.parse::<ItemImpl>() {
Ok(res) => impls.push(res),
Err(e) => {
let mut error = syn::Error::new(
input.span(),
r#"Invalid syntax inside block.
supported item are:
- impl blocks
- references to other impl_api_blocks through `external_impls!{ <comma separated list of module paths> }
"#,
);
error.combine(e);
return Err(error)
},
}
}
}

Expand Down

0 comments on commit c8375d0

Please sign in to comment.