Skip to content

Adds ability to use provided ident verbatim for export#13

Merged
sam0x17 merged 5 commits intosam0x17:mainfrom
gupnik:verbatim_export
Oct 10, 2023
Merged

Adds ability to use provided ident verbatim for export#13
sam0x17 merged 5 commits intosam0x17:mainfrom
gupnik:verbatim_export

Conversation

@gupnik
Copy link
Copy Markdown

@gupnik gupnik commented Oct 9, 2023

No description provided.

@sam0x17
Copy link
Copy Markdown
Owner

sam0x17 commented Oct 10, 2023

The revelation here is that a macro and an item can sit in scope with the same name without issue, so why not let the export tokens macro shadow the item :)

@sam0x17 sam0x17 added the enhancement New feature or request label Oct 10, 2023
@sam0x17 sam0x17 merged commit cdc40f3 into sam0x17:main Oct 10, 2023
@sam0x17
Copy link
Copy Markdown
Owner

sam0x17 commented Oct 10, 2023

published in v0.4.3

gupnik added a commit to paritytech/polkadot-sdk that referenced this pull request Oct 11, 2023
Needs sam0x17/macro_magic#13

The associated PR allows the export of tokens from macro_magic at the
specified path. This fixes the path issue in derive-impl. Now, we can
import the default config using the standard rust syntax:

```rust
use frame_system::config_preludes::TestDefaultConfig;

[derive_impl(TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::DefaultConfig for Test {
   //....
}
```
bgallois pushed a commit to duniter/duniter-polkadot-sdk that referenced this pull request Mar 25, 2024
Needs sam0x17/macro_magic#13

The associated PR allows the export of tokens from macro_magic at the
specified path. This fixes the path issue in derive-impl. Now, we can
import the default config using the standard rust syntax:

```rust
use frame_system::config_preludes::TestDefaultConfig;

[derive_impl(TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::DefaultConfig for Test {
   //....
}
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants