update macro_magic to 0.4.1 (#14356)

* update to macro_magic 0.4.0

* remove deprecated syntax and related doc comments

* upgrade to macro_magic v0.4.1

* fix import issue

* fix UI tests

* resolve frame_support path properly

* add docs note about importing

* fix typo

* Update frame/support/procedural/src/lib.rs

Co-authored-by: Guillaume Yu Thiolliere <gui.thiolliere@gmail.com>

* revert UI tests changes because we can't use rust 1.70

* fix UI tests

* fix another UI test

* use simplified import style

* switch back import since tests are written expecting it that way

---------

Co-authored-by: Guillaume Yu Thiolliere <gui.thiolliere@gmail.com>
This commit is contained in:
Sam Johnson
2023-06-16 09:06:28 -04:00
committed by GitHub
parent 1453bc9a2d
commit 18df38a4b6
9 changed files with 65 additions and 72 deletions
@@ -106,12 +106,6 @@ pub mod pallet {
#[cfg(any(test, doc))]
pub mod tests {
use super::*;
use frame_support::macro_magic::use_attr;
// Because `derive_impl` is a [macro_magic](https://crates.io/crates/macro_magic) attribute
// macro, [`#[use_attr]`](`frame_support::macro_magic::use_attr`) must be attached to any use
// statement that brings it into scope.
#[use_attr]
use frame_support::derive_impl;
use super::pallet as pallet_default_config_example;
@@ -168,7 +162,7 @@ pub mod tests {
}
// Similarly, we use the defaults provided by own crate as well.
use pallet::config_preludes::TestDefaultConfig;
use pallet::config_preludes::*;
#[derive_impl(TestDefaultConfig as pallet::DefaultConfig)]
impl crate::pallet::Config for Test {
// These two both cannot have defaults.