Disambiguate BlockNumber type in decl_module (#7061)

* Disambiguate `BlockNumber` type in `decl_module`

* fix `frame-support-tests`

* fix ui tests

* fix trait order
This commit is contained in:
Shawn Tabrizi
2020-09-10 01:47:24 +02:00
committed by GitHub
parent 5dc36072d9
commit 50568fcc19
19 changed files with 64 additions and 53 deletions
@@ -1,5 +1,5 @@
frame_support::decl_module! {
pub struct Module<T: Trait> for enum Call where origin: T::Origin {
pub struct Module<T: Trait> for enum Call where origin: T::Origin, system=self {
fn integrity_test() {}
fn integrity_test() {}
@@ -2,7 +2,7 @@ error: `integrity_test` can only be passed once as input.
--> $DIR/reserved_keyword_two_times_integrity_test.rs:1:1
|
1 | / frame_support::decl_module! {
2 | | pub struct Module<T: Trait> for enum Call where origin: T::Origin {
2 | | pub struct Module<T: Trait> for enum Call where origin: T::Origin, system=self {
3 | | fn integrity_test() {}
4 | |
5 | | fn integrity_test() {}
@@ -16,7 +16,7 @@ error[E0601]: `main` function not found in crate `$CRATE`
--> $DIR/reserved_keyword_two_times_integrity_test.rs:1:1
|
1 | / frame_support::decl_module! {
2 | | pub struct Module<T: Trait> for enum Call where origin: T::Origin {
2 | | pub struct Module<T: Trait> for enum Call where origin: T::Origin, system=self {
3 | | fn integrity_test() {}
4 | |
5 | | fn integrity_test() {}
@@ -1,5 +1,5 @@
frame_support::decl_module! {
pub struct Module<T: Trait> for enum Call where origin: T::Origin {
pub struct Module<T: Trait> for enum Call where origin: T::Origin, system=self {
fn on_initialize() -> Weight {
0
}
@@ -2,7 +2,7 @@ error: `on_initialize` can only be passed once as input.
--> $DIR/reserved_keyword_two_times_on_initialize.rs:1:1
|
1 | / frame_support::decl_module! {
2 | | pub struct Module<T: Trait> for enum Call where origin: T::Origin {
2 | | pub struct Module<T: Trait> for enum Call where origin: T::Origin, system=self {
3 | | fn on_initialize() -> Weight {
4 | | 0
... |
@@ -16,7 +16,7 @@ error[E0601]: `main` function not found in crate `$CRATE`
--> $DIR/reserved_keyword_two_times_on_initialize.rs:1:1
|
1 | / frame_support::decl_module! {
2 | | pub struct Module<T: Trait> for enum Call where origin: T::Origin {
2 | | pub struct Module<T: Trait> for enum Call where origin: T::Origin, system=self {
3 | | fn on_initialize() -> Weight {
4 | | 0
... |