generate_storage_alias: Rewrite as proc macro attribute (#11387)
* generate_storage_alias: Rewrite as proc macro attribute This rewrites the `generate_storage_alias!` declarative macro as proc-macro attribute. While doing this the name is changed to `storage_alias`. The prefix can now also be the name of a pallet. This makes storage aliases work in migrations for all kind of chains and not just for the ones that use predefined prefixes. * Fix compilation and FMT * Moare fixes ** ...... * Rework the syntax and support instancing * FMT * Prefix variants with `Storage` * Make it compile * Fix where clause on rust stable
Showing
- substrate/frame/bags-list/src/list/tests.rs 4 additions, 6 deletionssubstrate/frame/bags-list/src/list/tests.rs
- substrate/frame/bags-list/src/migrations.rs 3 additions, 2 deletionssubstrate/frame/bags-list/src/migrations.rs
- substrate/frame/contracts/src/migration.rs 29 additions, 35 deletionssubstrate/frame/contracts/src/migration.rs
- substrate/frame/elections-phragmen/src/migrations/v3.rs 49 additions, 49 deletionssubstrate/frame/elections-phragmen/src/migrations/v3.rs
- substrate/frame/offences/src/migration.rs 4 additions, 7 deletionssubstrate/frame/offences/src/migration.rs
- substrate/frame/staking/src/migrations.rs 37 additions, 26 deletionssubstrate/frame/staking/src/migrations.rs
- substrate/frame/support/procedural/src/lib.rs 8 additions, 0 deletionssubstrate/frame/support/procedural/src/lib.rs
- substrate/frame/support/procedural/src/storage_alias.rs 566 additions, 0 deletionssubstrate/frame/support/procedural/src/storage_alias.rs
- substrate/frame/support/src/lib.rs 70 additions, 162 deletionssubstrate/frame/support/src/lib.rs
- substrate/frame/support/src/storage/bounded_btree_map.rs 9 additions, 6 deletionssubstrate/frame/support/src/storage/bounded_btree_map.rs
- substrate/frame/support/src/storage/bounded_btree_set.rs 9 additions, 6 deletionssubstrate/frame/support/src/storage/bounded_btree_set.rs
- substrate/frame/support/src/storage/bounded_vec.rs 9 additions, 6 deletionssubstrate/frame/support/src/storage/bounded_vec.rs
- substrate/frame/support/src/storage/generator/double_map.rs 2 additions, 4 deletionssubstrate/frame/support/src/storage/generator/double_map.rs
- substrate/frame/support/src/storage/generator/map.rs 2 additions, 1 deletionsubstrate/frame/support/src/storage/generator/map.rs
- substrate/frame/support/src/storage/generator/nmap.rs 14 additions, 8 deletionssubstrate/frame/support/src/storage/generator/nmap.rs
- substrate/frame/support/src/storage/mod.rs 9 additions, 10 deletionssubstrate/frame/support/src/storage/mod.rs
- substrate/frame/support/src/storage/types/nmap.rs 3 additions, 5 deletionssubstrate/frame/support/src/storage/types/nmap.rs
- substrate/frame/support/src/storage/weak_bounded_vec.rs 7 additions, 6 deletionssubstrate/frame/support/src/storage/weak_bounded_vec.rs
- substrate/frame/support/test/tests/pallet.rs 15 additions, 0 deletionssubstrate/frame/support/test/tests/pallet.rs
- substrate/frame/support/test/tests/pallet_instance.rs 13 additions, 0 deletionssubstrate/frame/support/test/tests/pallet_instance.rs
Please register or sign in to comment