mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-01 15:57:55 +00:00
upgrade to macro_magic 0.4.3 (#1832)
# Description Upgrades `macro_magic` to 0.4.3, which introduces the ability to have `export_tokens` use the same name as the underlying item for its auto-generated macro name. Ultimately this will allow for better dev ux in our derive_impl feature.
This commit is contained in:
@@ -864,7 +864,12 @@ pub fn register_default_impl(attrs: TokenStream, tokens: TokenStream) -> TokenSt
|
||||
let item_impl = syn::parse_macro_input!(tokens as ItemImpl);
|
||||
|
||||
// internally wrap macro_magic's `#[export_tokens]` macro
|
||||
match macro_magic::mm_core::export_tokens_internal(attrs, item_impl.to_token_stream(), true) {
|
||||
match macro_magic::mm_core::export_tokens_internal(
|
||||
attrs,
|
||||
item_impl.to_token_stream(),
|
||||
true,
|
||||
true,
|
||||
) {
|
||||
Ok(tokens) => tokens.into(),
|
||||
Err(err) => err.to_compile_error().into(),
|
||||
}
|
||||
@@ -1565,7 +1570,7 @@ pub fn pallet_section(attr: TokenStream, tokens: TokenStream) -> TokenStream {
|
||||
let _mod = parse_macro_input!(tokens_clone as ItemMod);
|
||||
|
||||
// use macro_magic's export_tokens as the internal implementation otherwise
|
||||
match macro_magic::mm_core::export_tokens_internal(attr, tokens, false) {
|
||||
match macro_magic::mm_core::export_tokens_internal(attr, tokens, false, true) {
|
||||
Ok(tokens) => tokens.into(),
|
||||
Err(err) => err.to_compile_error().into(),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user