Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion frame/democracy/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1513,7 +1513,9 @@ impl<T: Config> Pallet<T> {
};
sp_std::mem::swap(&mut old, voting);
match old {
Voting::Delegating { balance, target, conviction, delegations, mut prior, .. } => {
Voting::Delegating {
balance, target, conviction, delegations, mut prior, ..
} => {
// remove any delegation votes to our current target.
Self::reduce_upstream_delegation(&target, conviction.votes(balance));
let now = frame_system::Pallet::<T>::block_number();
Expand Down
6 changes: 3 additions & 3 deletions frame/support/test/tests/derive_no_bound_ui/clone.stderr
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
error[E0277]: the trait bound `<T as Config>::C: Clone` is not satisfied
--> $DIR/clone.rs:7:2
--> tests/derive_no_bound_ui/clone.rs:7:2
|
7 | c: T::C,
| ^ the trait `Clone` is not implemented for `<T as Config>::C`
|
note: required by `clone`
--> $DIR/clone.rs:121:5
--> $RUST/core/src/clone.rs
|
121 | fn clone(&self) -> Self;
| fn clone(&self) -> Self;
| ^^^^^^^^^^^^^^^^^^^^^^^^
6 changes: 3 additions & 3 deletions frame/support/test/tests/derive_no_bound_ui/eq.stderr
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
error[E0277]: can't compare `Foo<T>` with `Foo<T>`
--> $DIR/eq.rs:6:8
--> tests/derive_no_bound_ui/eq.rs:6:8
|
6 | struct Foo<T: Config> {
| ^^^ no implementation for `Foo<T> == Foo<T>`
|
= help: the trait `PartialEq` is not implemented for `Foo<T>`
note: required by a bound in `std::cmp::Eq`
--> $DIR/cmp.rs:272:15
--> $RUST/core/src/cmp.rs
|
272 | pub trait Eq: PartialEq<Self> {
| pub trait Eq: PartialEq<Self> {
| ^^^^^^^^^^^^^^^ required by this bound in `std::cmp::Eq`
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0277]: `<T as pallet::Config>::Bar` doesn't implement `std::fmt::Debug`
--> $DIR/call_argument_invalid_bound.rs:20:36
--> tests/pallet_ui/call_argument_invalid_bound.rs:20:36
|
20 | pub fn foo(origin: OriginFor<T>, bar: T::Bar) -> DispatchResultWithPostInfo {
| ^^^ `<T as pallet::Config>::Bar` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
Expand All @@ -9,19 +9,19 @@ error[E0277]: `<T as pallet::Config>::Bar` doesn't implement `std::fmt::Debug`
= note: required for the cast to the object type `dyn std::fmt::Debug`

error[E0277]: the trait bound `<T as pallet::Config>::Bar: Clone` is not satisfied
--> $DIR/call_argument_invalid_bound.rs:20:36
--> tests/pallet_ui/call_argument_invalid_bound.rs:20:36
|
20 | pub fn foo(origin: OriginFor<T>, bar: T::Bar) -> DispatchResultWithPostInfo {
| ^^^ the trait `Clone` is not implemented for `<T as pallet::Config>::Bar`
|
note: required by `clone`
--> $DIR/clone.rs:121:5
--> $RUST/core/src/clone.rs
|
121 | fn clone(&self) -> Self;
| fn clone(&self) -> Self;
| ^^^^^^^^^^^^^^^^^^^^^^^^

error[E0369]: binary operation `==` cannot be applied to type `&<T as pallet::Config>::Bar`
--> $DIR/call_argument_invalid_bound.rs:20:36
--> tests/pallet_ui/call_argument_invalid_bound.rs:20:36
|
20 | pub fn foo(origin: OriginFor<T>, bar: T::Bar) -> DispatchResultWithPostInfo {
| ^^^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0277]: `<T as pallet::Config>::Bar` doesn't implement `std::fmt::Debug`
--> $DIR/call_argument_invalid_bound_2.rs:20:36
--> tests/pallet_ui/call_argument_invalid_bound_2.rs:20:36
|
20 | pub fn foo(origin: OriginFor<T>, bar: T::Bar) -> DispatchResultWithPostInfo {
| ^^^ `<T as pallet::Config>::Bar` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
Expand All @@ -9,19 +9,19 @@ error[E0277]: `<T as pallet::Config>::Bar` doesn't implement `std::fmt::Debug`
= note: required for the cast to the object type `dyn std::fmt::Debug`

error[E0277]: the trait bound `<T as pallet::Config>::Bar: Clone` is not satisfied
--> $DIR/call_argument_invalid_bound_2.rs:20:36
--> tests/pallet_ui/call_argument_invalid_bound_2.rs:20:36
|
20 | pub fn foo(origin: OriginFor<T>, bar: T::Bar) -> DispatchResultWithPostInfo {
| ^^^ the trait `Clone` is not implemented for `<T as pallet::Config>::Bar`
|
note: required by `clone`
--> $DIR/clone.rs:121:5
--> $RUST/core/src/clone.rs
|
121 | fn clone(&self) -> Self;
| fn clone(&self) -> Self;
| ^^^^^^^^^^^^^^^^^^^^^^^^

error[E0369]: binary operation `==` cannot be applied to type `&<T as pallet::Config>::Bar`
--> $DIR/call_argument_invalid_bound_2.rs:20:36
--> tests/pallet_ui/call_argument_invalid_bound_2.rs:20:36
|
20 | pub fn foo(origin: OriginFor<T>, bar: T::Bar) -> DispatchResultWithPostInfo {
| ^^^
Expand All @@ -32,7 +32,7 @@ help: consider further restricting this bound
| +++++++++++++++++++++

error[E0277]: the trait bound `<T as pallet::Config>::Bar: WrapperTypeEncode` is not satisfied
--> $DIR/call_argument_invalid_bound_2.rs:1:1
--> tests/pallet_ui/call_argument_invalid_bound_2.rs:1:1
|
1 | #[frame_support::pallet]
| ^-----------------------
Expand All @@ -49,21 +49,21 @@ error[E0277]: the trait bound `<T as pallet::Config>::Bar: WrapperTypeEncode` is
|
= note: required because of the requirements on the impl of `Encode` for `<T as pallet::Config>::Bar`
note: required by a bound in `encode_to`
--> $DIR/codec.rs:223:18
--> $CARGO/parity-scale-codec-2.3.1/src/codec.rs
|
223 | fn encode_to<T: Output + ?Sized>(&self, dest: &mut T) {
| fn encode_to<T: Output + ?Sized>(&self, dest: &mut T) {
| ^^^^^^ required by this bound in `encode_to`
= note: this error originates in the derive macro `frame_support::codec::Encode` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `<T as pallet::Config>::Bar: WrapperTypeDecode` is not satisfied
--> $DIR/call_argument_invalid_bound_2.rs:20:36
--> tests/pallet_ui/call_argument_invalid_bound_2.rs:20:36
|
20 | pub fn foo(origin: OriginFor<T>, bar: T::Bar) -> DispatchResultWithPostInfo {
| ^^^ the trait `WrapperTypeDecode` is not implemented for `<T as pallet::Config>::Bar`
|
= note: required because of the requirements on the impl of `Decode` for `<T as pallet::Config>::Bar`
note: required by a bound in `parity_scale_codec::Decode::decode`
--> $DIR/codec.rs:284:15
--> $CARGO/parity-scale-codec-2.3.1/src/codec.rs
|
284 | fn decode<I: Input>(input: &mut I) -> Result<Self, Error>;
| fn decode<I: Input>(input: &mut I) -> Result<Self, Error>;
| ^^^^^ required by this bound in `parity_scale_codec::Decode::decode`
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0277]: `Bar` doesn't implement `std::fmt::Debug`
--> $DIR/call_argument_invalid_bound_3.rs:22:36
--> tests/pallet_ui/call_argument_invalid_bound_3.rs:22:36
|
22 | pub fn foo(origin: OriginFor<T>, bar: Bar) -> DispatchResultWithPostInfo {
| ^^^ `Bar` cannot be formatted using `{:?}`
Expand All @@ -10,21 +10,19 @@ error[E0277]: `Bar` doesn't implement `std::fmt::Debug`
= note: required for the cast to the object type `dyn std::fmt::Debug`

error[E0277]: the trait bound `Bar: Clone` is not satisfied
--> $DIR/call_argument_invalid_bound_3.rs:22:36
--> tests/pallet_ui/call_argument_invalid_bound_3.rs:22:36
|
22 | pub fn foo(origin: OriginFor<T>, bar: Bar) -> DispatchResultWithPostInfo {
| ^^^ the trait `Clone` is not implemented for `Bar`
|
note: required by `clone`
--> $DIR/clone.rs:121:5
--> $RUST/core/src/clone.rs
|
121 | fn clone(&self) -> Self;
| fn clone(&self) -> Self;
| ^^^^^^^^^^^^^^^^^^^^^^^^

error[E0369]: binary operation `==` cannot be applied to type `&Bar`
--> $DIR/call_argument_invalid_bound_3.rs:22:36
--> tests/pallet_ui/call_argument_invalid_bound_3.rs:22:36
|
22 | pub fn foo(origin: OriginFor<T>, bar: Bar) -> DispatchResultWithPostInfo {
| ^^^
|
= note: an implementation of `std::cmp::PartialEq` might be missing for `&Bar`
10 changes: 5 additions & 5 deletions frame/support/test/tests/pallet_ui/event_field_not_member.stderr
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
error[E0277]: the trait bound `<T as pallet::Config>::Bar: Clone` is not satisfied
--> $DIR/event_field_not_member.rs:23:7
--> tests/pallet_ui/event_field_not_member.rs:23:7
|
23 | B { b: T::Bar },
| ^ the trait `Clone` is not implemented for `<T as pallet::Config>::Bar`
|
note: required by `clone`
--> $DIR/clone.rs:121:5
--> $RUST/core/src/clone.rs
|
121 | fn clone(&self) -> Self;
| fn clone(&self) -> Self;
| ^^^^^^^^^^^^^^^^^^^^^^^^

error[E0369]: binary operation `==` cannot be applied to type `&<T as pallet::Config>::Bar`
--> $DIR/event_field_not_member.rs:23:7
--> tests/pallet_ui/event_field_not_member.rs:23:7
|
23 | B { b: T::Bar },
| ^
Expand All @@ -22,7 +22,7 @@ help: consider further restricting this bound
| +++++++++++++++++++++

error[E0277]: `<T as pallet::Config>::Bar` doesn't implement `std::fmt::Debug`
--> $DIR/event_field_not_member.rs:23:7
--> tests/pallet_ui/event_field_not_member.rs:23:7
|
23 | B { b: T::Bar },
| ^ `<T as pallet::Config>::Bar` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
error[E0277]: the trait bound `Bar: MaxEncodedLen` is not satisfied
--> $DIR/storage_info_unsatisfied_nmap.rs:10:12
--> tests/pallet_ui/storage_info_unsatisfied_nmap.rs:10:12
|
10 | #[pallet::generate_storage_info]
| ^^^^^^^^^^^^^^^^^^^^^ the trait `MaxEncodedLen` is not implemented for `Bar`
|
= note: required because of the requirements on the impl of `KeyGeneratorMaxEncodedLen` for `NMapKey<frame_support::Twox64Concat, Bar>`
= note: required because of the requirements on the impl of `StorageInfoTrait` for `frame_support::pallet_prelude::StorageNMap<_GeneratedPrefixForStorageFoo<T>, NMapKey<frame_support::Twox64Concat, Bar>, u32>`
= note: required because of the requirements on the impl of `KeyGeneratorMaxEncodedLen` for `Key<frame_support::Twox64Concat, Bar>`
= note: required because of the requirements on the impl of `StorageInfoTrait` for `frame_support::pallet_prelude::StorageNMap<_GeneratedPrefixForStorageFoo<T>, Key<frame_support::Twox64Concat, Bar>, u32>`
note: required by `storage_info`
--> $DIR/storage.rs:71:2
--> $WORKSPACE/frame/support/src/traits/storage.rs
|
71 | fn storage_info() -> Vec<StorageInfo>;
| fn storage_info() -> Vec<StorageInfo>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20 changes: 10 additions & 10 deletions frame/support/test/tests/reserved_keyword/on_initialize.stderr
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
error: Invalid call fn name: `on_finalize`, name is reserved and doesn't match expected signature, please refer to `decl_module!` documentation to see the appropriate usage, or rename it to an unreserved keyword.
--> $DIR/on_initialize.rs:28:1
--> tests/reserved_keyword/on_initialize.rs:28:1
|
28 | reserved!(on_finalize on_initialize on_runtime_upgrade offchain_worker deposit_event);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in the macro `$crate::__check_reserved_fn_name` (in Nightly builds, run with -Z macro-backtrace for more info)

error: Invalid call fn name: `on_initialize`, name is reserved and doesn't match expected signature, please refer to `decl_module!` documentation to see the appropriate usage, or rename it to an unreserved keyword.
--> $DIR/on_initialize.rs:28:1
--> tests/reserved_keyword/on_initialize.rs:28:1
|
28 | reserved!(on_finalize on_initialize on_runtime_upgrade offchain_worker deposit_event);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in the macro `$crate::__check_reserved_fn_name` (in Nightly builds, run with -Z macro-backtrace for more info)

error: Invalid call fn name: `on_runtime_upgrade`, name is reserved and doesn't match expected signature, please refer to `decl_module!` documentation to see the appropriate usage, or rename it to an unreserved keyword.
--> $DIR/on_initialize.rs:28:1
--> tests/reserved_keyword/on_initialize.rs:28:1
|
28 | reserved!(on_finalize on_initialize on_runtime_upgrade offchain_worker deposit_event);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in the macro `$crate::__check_reserved_fn_name` (in Nightly builds, run with -Z macro-backtrace for more info)

error: Invalid call fn name: `offchain_worker`, name is reserved and doesn't match expected signature, please refer to `decl_module!` documentation to see the appropriate usage, or rename it to an unreserved keyword.
--> $DIR/on_initialize.rs:28:1
--> tests/reserved_keyword/on_initialize.rs:28:1
|
28 | reserved!(on_finalize on_initialize on_runtime_upgrade offchain_worker deposit_event);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in the macro `$crate::__check_reserved_fn_name` (in Nightly builds, run with -Z macro-backtrace for more info)

error: Invalid call fn name: `deposit_event`, name is reserved and doesn't match expected signature, please refer to `decl_module!` documentation to see the appropriate usage, or rename it to an unreserved keyword.
--> $DIR/on_initialize.rs:28:1
--> tests/reserved_keyword/on_initialize.rs:28:1
|
28 | reserved!(on_finalize on_initialize on_runtime_upgrade offchain_worker deposit_event);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in the macro `$crate::__check_reserved_fn_name` (in Nightly builds, run with -Z macro-backtrace for more info)