mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 11:38:01 +00:00
Make hooks and call attributes optional in pallet macro (#8853)
* Make #[pallet::hooks] optional * Make #[pallet::call] optional * Remove unused imports * Update UI test expectations * Update UI test expectations * Remove unnecessary HooksDef::empty method * Remove unnecessary CallDef::empty method * Clarify what would happen when no call or hooks are specified in a pallet
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
error: Invalid generic declaration, trait is defined with instance but generic use none
|
||||
--> $DIR/inconsistent_instance_1.rs:10:20
|
||||
|
|
||||
10 | pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
| ^
|
||||
|
||||
error: Invalid generic declaration, trait is defined with instance but generic use none
|
||||
--> $DIR/inconsistent_instance_1.rs:16:7
|
||||
|
|
||||
@@ -10,12 +16,6 @@ error: Invalid generic declaration, trait is defined with instance but generic u
|
||||
16 | impl<T: Config> Pallet<T> {}
|
||||
| ^^^^^^
|
||||
|
||||
error: Invalid generic declaration, trait is defined with instance but generic use none
|
||||
--> $DIR/inconsistent_instance_1.rs:10:20
|
||||
|
|
||||
10 | pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
| ^
|
||||
|
||||
error: Invalid generic declaration, trait is defined with instance but generic use none
|
||||
--> $DIR/inconsistent_instance_1.rs:13:47
|
||||
|
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
error: Invalid generic declaration, trait is defined without instance but generic use some
|
||||
--> $DIR/inconsistent_instance_2.rs:10:20
|
||||
|
|
||||
10 | pub struct Pallet<T, I = ()>(core::marker::PhantomData<(T, I)>);
|
||||
| ^
|
||||
|
||||
error: Invalid generic declaration, trait is defined without instance but generic use some
|
||||
--> $DIR/inconsistent_instance_2.rs:16:7
|
||||
|
|
||||
@@ -10,12 +16,6 @@ error: Invalid generic declaration, trait is defined without instance but generi
|
||||
16 | impl<T: Config<I>, I: 'static> Pallet<T, I> {}
|
||||
| ^^^^^^
|
||||
|
||||
error: Invalid generic declaration, trait is defined without instance but generic use some
|
||||
--> $DIR/inconsistent_instance_2.rs:10:20
|
||||
|
|
||||
10 | pub struct Pallet<T, I = ()>(core::marker::PhantomData<(T, I)>);
|
||||
| ^
|
||||
|
||||
error: Invalid generic declaration, trait is defined without instance but generic use some
|
||||
--> $DIR/inconsistent_instance_2.rs:13:62
|
||||
|
|
||||
|
||||
Reference in New Issue
Block a user