docs(pallets/governance): add some type aliases and improve create_ap… #618
Annotations
23 errors
check
Canceling since a higher priority waiting request for 'Linting and Testing-refs/heads/feature/chain-45-improve-torus-substrate-docstrings' exists
|
check
The operation was canceled.
|
the function or associated item `insert` exists for struct `StorageMap<_GeneratedPrefixForStorageProposals<T>, Identity, u64, Proposal<T>>`, but its trait bounds were not satisfied:
pallets/governance/src/voting.rs#L76
error[E0599]: the function or associated item `insert` exists for struct `StorageMap<_GeneratedPrefixForStorageProposals<T>, Identity, u64, Proposal<T>>`, but its trait bounds were not satisfied
--> pallets/governance/src/voting.rs:76:21
|
76 | Proposals::<T>::insert(proposal.id, proposal);
| ^^^^^^ function or associated item cannot be called due to unsatisfied trait bounds
|
::: pallets/governance/src/proposal.rs:30:1
|
30 | pub struct Proposal<T: crate::Config> {
| ------------------------------------- doesn't satisfy `proposal::Proposal<T>: std::marker::Sized`
|
= note: the full type name has been written to '/home/runner/work/torus-substrate/torus-substrate/target/debug/deps/pallet_governance-d8b7f934315ee661.long-type-3278164290536503744.txt'
= note: consider using `--verbose` to print the full type name to the console
= note: the following trait bounds were not satisfied:
`{type error}: std::marker::Sized`
which is required by `proposal::Proposal<T>: std::marker::Sized`
|
the function or associated item `try_get` exists for struct `StorageMap<_GeneratedPrefixForStorageProposals<T>, Identity, u64, Proposal<T>>`, but its trait bounds were not satisfied:
pallets/governance/src/voting.rs#L57
error[E0599]: the function or associated item `try_get` exists for struct `StorageMap<_GeneratedPrefixForStorageProposals<T>, Identity, u64, Proposal<T>>`, but its trait bounds were not satisfied
--> pallets/governance/src/voting.rs:57:44
|
57 | let Ok(mut proposal) = Proposals::<T>::try_get(proposal_id) else {
| ^^^^^^^ function or associated item cannot be called due to unsatisfied trait bounds
|
::: pallets/governance/src/proposal.rs:30:1
|
30 | pub struct Proposal<T: crate::Config> {
| ------------------------------------- doesn't satisfy `proposal::Proposal<T>: std::marker::Sized`
|
= note: the full type name has been written to '/home/runner/work/torus-substrate/torus-substrate/target/debug/deps/pallet_governance-d8b7f934315ee661.long-type-3278164290536503744.txt'
= note: consider using `--verbose` to print the full type name to the console
= note: the following trait bounds were not satisfied:
`{type error}: std::marker::Sized`
which is required by `proposal::Proposal<T>: std::marker::Sized`
|
the function or associated item `insert` exists for struct `StorageMap<_GeneratedPrefixForStorageProposals<T>, Identity, u64, Proposal<T>>`, but its trait bounds were not satisfied:
pallets/governance/src/voting.rs#L50
error[E0599]: the function or associated item `insert` exists for struct `StorageMap<_GeneratedPrefixForStorageProposals<T>, Identity, u64, Proposal<T>>`, but its trait bounds were not satisfied
--> pallets/governance/src/voting.rs:50:21
|
50 | Proposals::<T>::insert(proposal.id, proposal);
| ^^^^^^ function or associated item cannot be called due to unsatisfied trait bounds
|
::: pallets/governance/src/proposal.rs:30:1
|
30 | pub struct Proposal<T: crate::Config> {
| ------------------------------------- doesn't satisfy `proposal::Proposal<T>: std::marker::Sized`
|
= note: the full type name has been written to '/home/runner/work/torus-substrate/torus-substrate/target/debug/deps/pallet_governance-d8b7f934315ee661.long-type-3278164290536503744.txt'
= note: consider using `--verbose` to print the full type name to the console
= note: the following trait bounds were not satisfied:
`{type error}: std::marker::Sized`
which is required by `proposal::Proposal<T>: std::marker::Sized`
|
the function or associated item `get` exists for struct `StorageMap<_GeneratedPrefixForStorageProposals<T>, Identity, u64, Proposal<T>>`, but its trait bounds were not satisfied:
pallets/governance/src/voting.rs#L10
error[E0599]: the function or associated item `get` exists for struct `StorageMap<_GeneratedPrefixForStorageProposals<T>, Identity, u64, Proposal<T>>`, but its trait bounds were not satisfied
--> pallets/governance/src/voting.rs:10:46
|
10 | let Some(mut proposal) = Proposals::<T>::get(proposal_id) else {
| ^^^ function or associated item cannot be called due to unsatisfied trait bounds
|
::: pallets/governance/src/proposal.rs:30:1
|
30 | pub struct Proposal<T: crate::Config> {
| ------------------------------------- doesn't satisfy `proposal::Proposal<T>: std::marker::Sized`
|
= note: the full type name has been written to '/home/runner/work/torus-substrate/torus-substrate/target/debug/deps/pallet_governance-d8b7f934315ee661.long-type-3278164290536503744.txt'
= note: consider using `--verbose` to print the full type name to the console
= note: the following trait bounds were not satisfied:
`{type error}: std::marker::Sized`
which is required by `proposal::Proposal<T>: std::marker::Sized`
|
the function or associated item `set` exists for struct `StorageMap<_GeneratedPrefixForStorageProposals<T>, Identity, u64, Proposal<T>>`, but its trait bounds were not satisfied:
pallets/governance/src/proposal.rs#L511
error[E0599]: the function or associated item `set` exists for struct `StorageMap<_GeneratedPrefixForStorageProposals<T>, Identity, u64, Proposal<T>>`, but its trait bounds were not satisfied
--> pallets/governance/src/proposal.rs:511:25
|
30 | pub struct Proposal<T: crate::Config> {
| ------------------------------------- doesn't satisfy `proposal::Proposal<T>: std::marker::Sized`
...
511 | Proposals::<T>::set(proposal.id, Some(proposal.clone()));
| ^^^ function or associated item cannot be called due to unsatisfied trait bounds
|
= note: the full type name has been written to '/home/runner/work/torus-substrate/torus-substrate/target/debug/deps/pallet_governance-d8b7f934315ee661.long-type-3278164290536503744.txt'
= note: consider using `--verbose` to print the full type name to the console
= note: the following trait bounds were not satisfied:
`{type error}: std::marker::Sized`
which is required by `proposal::Proposal<T>: std::marker::Sized`
|
the function or associated item `iter` exists for struct `StorageMap<_GeneratedPrefixForStorageProposals<T>, Identity, u64, Proposal<T>>`, but its trait bounds were not satisfied:
pallets/governance/src/proposal.rs#L437
error[E0599]: the function or associated item `iter` exists for struct `StorageMap<_GeneratedPrefixForStorageProposals<T>, Identity, u64, Proposal<T>>`, but its trait bounds were not satisfied
--> pallets/governance/src/proposal.rs:437:37
|
30 | pub struct Proposal<T: crate::Config> {
| ------------------------------------- doesn't satisfy `proposal::Proposal<T>: std::marker::Sized`
...
437 | let proposals = Proposals::<T>::iter().filter(|(_, p)| p.is_active());
| ^^^^ function or associated item cannot be called due to unsatisfied trait bounds
|
= note: the full type name has been written to '/home/runner/work/torus-substrate/torus-substrate/target/debug/deps/pallet_governance-d8b7f934315ee661.long-type-3278164290536503744.txt'
= note: consider using `--verbose` to print the full type name to the console
= note: the following trait bounds were not satisfied:
`{type error}: std::marker::Sized`
which is required by `proposal::Proposal<T>: std::marker::Sized`
|
the function or associated item `insert` exists for struct `StorageMap<_GeneratedPrefixForStorageProposals<T>, Identity, u64, Proposal<T>>`, but its trait bounds were not satisfied:
pallets/governance/src/proposal.rs#L428
error[E0599]: the function or associated item `insert` exists for struct `StorageMap<_GeneratedPrefixForStorageProposals<T>, Identity, u64, Proposal<T>>`, but its trait bounds were not satisfied
--> pallets/governance/src/proposal.rs:428:28
|
30 | pub struct Proposal<T: crate::Config> {
| ------------------------------------- doesn't satisfy `proposal::Proposal<T>: std::marker::Sized`
...
428 | crate::Proposals::<T>::insert(proposal_id, proposal);
| ^^^^^^ function or associated item cannot be called due to unsatisfied trait bounds
|
= note: the full type name has been written to '/home/runner/work/torus-substrate/torus-substrate/target/debug/deps/pallet_governance-d8b7f934315ee661.long-type-3278164290536503744.txt'
= note: consider using `--verbose` to print the full type name to the console
= note: the following trait bounds were not satisfied:
`{type error}: std::marker::Sized`
which is required by `proposal::Proposal<T>: std::marker::Sized`
|
the function or associated item `iter` exists for struct `StorageMap<_GeneratedPrefixForStorageProposals<T>, Identity, u64, Proposal<T>>`, but its trait bounds were not satisfied:
pallets/governance/src/proposal.rs#L402
error[E0599]: the function or associated item `iter` exists for struct `StorageMap<_GeneratedPrefixForStorageProposals<T>, Identity, u64, Proposal<T>>`, but its trait bounds were not satisfied
--> pallets/governance/src/proposal.rs:402:51
|
30 | pub struct Proposal<T: crate::Config> {
| ------------------------------------- doesn't satisfy `proposal::Proposal<T>: std::marker::Sized`
...
402 | let proposal_id: u64 = crate::Proposals::<T>::iter()
| ^^^^ function or associated item cannot be called due to unsatisfied trait bounds
|
= note: the full type name has been written to '/home/runner/work/torus-substrate/torus-substrate/target/debug/deps/pallet_governance-d8b7f934315ee661.long-type-3278164290536503744.txt'
= note: consider using `--verbose` to print the full type name to the console
= note: the following trait bounds were not satisfied:
`{type error}: std::marker::Sized`
which is required by `proposal::Proposal<T>: std::marker::Sized`
|
the function or associated item `insert` exists for struct `StorageMap<_GeneratedPrefixForStorageProposals<T>, Identity, u64, Proposal<T>>`, but its trait bounds were not satisfied:
pallets/governance/src/proposal.rs#L175
error[E0599]: the function or associated item `insert` exists for struct `StorageMap<_GeneratedPrefixForStorageProposals<T>, Identity, u64, Proposal<T>>`, but its trait bounds were not satisfied
--> pallets/governance/src/proposal.rs:175:25
|
30 | pub struct Proposal<T: crate::Config> {
| ------------------------------------- doesn't satisfy `proposal::Proposal<T>: std::marker::Sized`
...
175 | Proposals::<T>::insert(self.id, &self);
| ^^^^^^ function or associated item cannot be called due to unsatisfied trait bounds
|
= note: the full type name has been written to '/home/runner/work/torus-substrate/torus-substrate/target/debug/deps/pallet_governance-d8b7f934315ee661.long-type-3278164290536503744.txt'
= note: consider using `--verbose` to print the full type name to the console
= note: the following trait bounds were not satisfied:
`{type error}: std::marker::Sized`
which is required by `proposal::Proposal<T>: std::marker::Sized`
|
the function or associated item `insert` exists for struct `StorageMap<_GeneratedPrefixForStorageProposals<T>, Identity, u64, Proposal<T>>`, but its trait bounds were not satisfied:
pallets/governance/src/proposal.rs#L159
error[E0599]: the function or associated item `insert` exists for struct `StorageMap<_GeneratedPrefixForStorageProposals<T>, Identity, u64, Proposal<T>>`, but its trait bounds were not satisfied
--> pallets/governance/src/proposal.rs:159:25
|
30 | pub struct Proposal<T: crate::Config> {
| ------------------------------------- doesn't satisfy `proposal::Proposal<T>: std::marker::Sized`
...
159 | Proposals::<T>::insert(self.id, &self);
| ^^^^^^ function or associated item cannot be called due to unsatisfied trait bounds
|
= note: the full type name has been written to '/home/runner/work/torus-substrate/torus-substrate/target/debug/deps/pallet_governance-d8b7f934315ee661.long-type-3278164290536503744.txt'
= note: consider using `--verbose` to print the full type name to the console
= note: the following trait bounds were not satisfied:
`{type error}: std::marker::Sized`
which is required by `proposal::Proposal<T>: std::marker::Sized`
|
the function or associated item `insert` exists for struct `StorageMap<_GeneratedPrefixForStorageProposals<T>, Identity, u64, Proposal<T>>`, but its trait bounds were not satisfied:
pallets/governance/src/proposal.rs#L74
error[E0599]: the function or associated item `insert` exists for struct `StorageMap<_GeneratedPrefixForStorageProposals<T>, Identity, u64, Proposal<T>>`, but its trait bounds were not satisfied
--> pallets/governance/src/proposal.rs:74:25
|
30 | pub struct Proposal<T: crate::Config> {
| ------------------------------------- doesn't satisfy `proposal::Proposal<T>: std::marker::Sized`
...
74 | Proposals::<T>::insert(self.id, &self);
| ^^^^^^ function or associated item cannot be called due to unsatisfied trait bounds
|
= note: the full type name has been written to '/home/runner/work/torus-substrate/torus-substrate/target/debug/deps/pallet_governance-d8b7f934315ee661.long-type-3278164290536503744.txt'
= note: consider using `--verbose` to print the full type name to the console
= note: the following trait bounds were not satisfied:
`{type error}: std::marker::Sized`
which is required by `proposal::Proposal<T>: std::marker::Sized`
|
field `creation_block` specified more than once:
pallets/governance/src/proposal.rs#L42
error[E0062]: field `creation_block` specified more than once
--> pallets/governance/src/proposal.rs:42:9
|
40 | pub creation_block: Block,
| ------------------ first use of `creation_block`
41 | /// The exact block when the block is created
42 | pub creation_block: BlockNumberFor<T>,
| ^^^^^^^^^^^^^^ used more than once
|
field `expiration_block` specified more than once:
pallets/governance/src/proposal.rs#L35
error[E0062]: field `expiration_block` specified more than once
--> pallets/governance/src/proposal.rs:35:9
|
33 | pub expiration_block: Block,
| -------------------- first use of `expiration_block`
34 | /// The exact block when the block will be expired/deleted
35 | pub expiration_block: BlockNumberFor<T>,
| ^^^^^^^^^^^^^^^^ used more than once
|
field `creation_block` specified more than once:
pallets/governance/src/proposal.rs#L42
error[E0062]: field `creation_block` specified more than once
--> pallets/governance/src/proposal.rs:42:5
|
40 | pub creation_block: Block,
| ------------------------- first use of `creation_block`
41 | /// The exact block when the block is created
42 | pub creation_block: BlockNumberFor<T>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ used more than once
|
field `expiration_block` specified more than once:
pallets/governance/src/proposal.rs#L35
error[E0062]: field `expiration_block` specified more than once
--> pallets/governance/src/proposal.rs:35:5
|
33 | pub expiration_block: Block,
| --------------------------- first use of `expiration_block`
34 | /// The exact block when the block will be expired/deleted
35 | pub expiration_block: BlockNumberFor<T>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ used more than once
|
field `creation_block` is already declared:
pallets/governance/src/proposal.rs#L42
error[E0124]: field `creation_block` is already declared
--> pallets/governance/src/proposal.rs:42:5
|
40 | pub creation_block: Block,
| ------------------------- `creation_block` first declared here
41 | /// The exact block when the block is created
42 | pub creation_block: BlockNumberFor<T>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ field already declared
|
field `expiration_block` is already declared:
pallets/governance/src/proposal.rs#L35
error[E0124]: field `expiration_block` is already declared
--> pallets/governance/src/proposal.rs:35:5
|
33 | pub expiration_block: Block,
| --------------------------- `expiration_block` first declared here
34 | /// The exact block when the block will be expired/deleted
35 | pub expiration_block: BlockNumberFor<T>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ field already declared
|
cannot find type `BlockNumberFor` in this scope:
pallets/governance/src/proposal.rs#L434
error[E0412]: cannot find type `BlockNumberFor` in this scope
--> pallets/governance/src/proposal.rs:434:55
|
434 | pub fn tick_proposals<T: crate::Config>(block_number: BlockNumberFor<T>) {
| ^^^^^^^^^^^^^^ not found in this scope
|
help: consider importing this type alias through its public re-export
|
1 + use crate::BlockNumberFor;
|
|
cannot find type `BlockNumberFor` in this scope:
pallets/governance/src/proposal.rs#L42
error[E0412]: cannot find type `BlockNumberFor` in this scope
--> pallets/governance/src/proposal.rs:42:25
|
42 | pub creation_block: BlockNumberFor<T>,
| ^^^^^^^^^^^^^^ not found in this scope
|
help: consider importing this type alias through its public re-export
|
1 + use crate::BlockNumberFor;
|
|
cannot find type `BlockNumberFor` in this scope:
pallets/governance/src/proposal.rs#L35
error[E0412]: cannot find type `BlockNumberFor` in this scope
--> pallets/governance/src/proposal.rs:35:27
|
35 | pub expiration_block: BlockNumberFor<T>,
| ^^^^^^^^^^^^^^ not found in this scope
|
help: consider importing this type alias through its public re-export
|
1 + use crate::BlockNumberFor;
|
|
cannot find type `BlockNumberFor` in this scope:
pallets/governance/src/application.rs#L25
error[E0412]: cannot find type `BlockNumberFor` in this scope
--> pallets/governance/src/application.rs:25:21
|
25 | pub expires_at: BlockNumberFor<T>,
| ^^^^^^^^^^^^^^ not found in this scope
|
help: consider importing this type alias through its public re-export
|
1 + use crate::BlockNumberFor;
|
|