forked from paritytech/substrate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hooks default impl missing where clause (paritytech#13264)
* hooks default impl missing where clause * add tests * Update frame/support/test/tests/pallet_ui/pass/where_clause_missing_hooks.rs --------- Co-authored-by: parity-processbot <>
- Loading branch information
1 parent
18e18a7
commit 26dfe7d
Showing
3 changed files
with
21 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,5 +22,4 @@ mod pallet { | |
type Foo<T> = StorageValue<_, u8>; | ||
} | ||
|
||
fn main() { | ||
} | ||
fn main() {} |
19 changes: 19 additions & 0 deletions
19
frame/support/test/tests/pallet_ui/pass/where_clause_missing_hooks.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#[frame_support::pallet] | ||
mod pallet { | ||
#[pallet::config] | ||
pub trait Config: frame_system::Config where <Self as frame_system::Config>::Index: From<u128> {} | ||
|
||
#[pallet::pallet] | ||
pub struct Pallet<T>(core::marker::PhantomData<T>); | ||
|
||
#[pallet::call] | ||
impl<T: Config> Pallet<T> where <T as frame_system::Config>::Index: From<u128> {} | ||
|
||
impl<T: Config> Pallet<T> where <T as frame_system::Config>::Index: From<u128> { | ||
fn foo(x: u128) { | ||
let _index = <T as frame_system::Config>::Index::from(x); | ||
} | ||
} | ||
} | ||
|
||
fn main() {} |