3 ms·
related: this approach also gives rise to eager expansion, which is supposed to be completely impossible in stable rust. The caveat is this eager expansion can
by sam0x17 3y ago
related: this approach also gives rise to eager expansion, which is supposed to be completely impossible in stable rust. The caveat is this eager expansion can _only_ work within a proc macro crate, so it is only useful in very specific circumstances.
Here is the first place such a thing was seen in the wild: https://github.com/paritytech/polkadot-sdk/blob/d0fd2660031b92a3896db3ea47e65f6f8af9a9ae/substrate/frame/support/procedural/src/lib.rs#L754-L765 https://github.com/paritytech/polkadot-sdk/blob/d0fd2660031b...