diff --git a/.cargo/config.toml b/.cargo/config.toml
index 4796a2c269..042dded2fa 100644
--- a/.cargo/config.toml
+++ b/.cargo/config.toml
@@ -1,4 +1,9 @@
-#
+[build]
+rustdocflags = [
+ "-Dwarnings",
+ "-Arustdoc::redundant_explicit_links", # stylistic
+]
+
# An auto defined `clippy` feature was introduced,
# but it was found to clash with user defined features,
# so was renamed to `cargo-clippy`.
@@ -30,4 +35,5 @@ rustflags = [
"-Aclippy::derivable_impls", # false positives
"-Aclippy::stable_sort_primitive", # prefer stable sort
"-Aclippy::extra-unused-type-parameters", # stylistic
+ "-Aclippy::default_constructed_unit_structs", # stylistic
]
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 61451a9c46..0d7e7adb95 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -21,7 +21,7 @@ workflow:
- if: $CI_COMMIT_BRANCH
variables:
- CI_IMAGE: !reference [.ci-unified, variables, CI_IMAGE]
+ CI_IMAGE: !reference [.ci-unified-1.73.0, variables, CI_IMAGE]
# BUILDAH_IMAGE is defined in group variables
BUILDAH_COMMAND: "buildah --storage-driver overlay2"
RELENG_SCRIPTS_BRANCH: "master"
diff --git a/.gitlab/pipeline/build.yml b/.gitlab/pipeline/build.yml
index 029c0f6a3c..fefa3739a9 100644
--- a/.gitlab/pipeline/build.yml
+++ b/.gitlab/pipeline/build.yml
@@ -91,6 +91,7 @@ build-rustdoc:
- .run-immediately
variables:
SKIP_WASM_BUILD: 1
+ RUSTDOCFLAGS: ""
artifacts:
name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}-doc"
when: on_success
@@ -99,7 +100,6 @@ build-rustdoc:
- ./crate-docs/
script:
# FIXME: it fails with `RUSTDOCFLAGS="-Dwarnings"` and `--all-features`
- # FIXME: return to stable when https://github.com/rust-lang/rust/issues/96937 gets into stable
- time cargo doc --features try-runtime,experimental --workspace --no-deps
- rm -f ./target/doc/.lock
- mv ./target/doc ./crate-docs
diff --git a/.gitlab/pipeline/test.yml b/.gitlab/pipeline/test.yml
index e1e8b96bca..12ce2140b1 100644
--- a/.gitlab/pipeline/test.yml
+++ b/.gitlab/pipeline/test.yml
@@ -181,7 +181,6 @@ test-rustdoc:
- .run-immediately
variables:
SKIP_WASM_BUILD: 1
- RUSTDOCFLAGS: "-Dwarnings"
script:
- time cargo doc --workspace --all-features --no-deps
allow_failure: true
diff --git a/polkadot/node/core/backing/src/tests/mod.rs b/polkadot/node/core/backing/src/tests/mod.rs
index bdc8b3fa1a..35d17f3d90 100644
--- a/polkadot/node/core/backing/src/tests/mod.rs
+++ b/polkadot/node/core/backing/src/tests/mod.rs
@@ -1595,8 +1595,8 @@ fn retry_works() {
},
AllMessages::RuntimeApi(RuntimeApiMessage::Request(
_,
- RuntimeApiRequest::SessionExecutorParams(sess_idx, tx),
- )) if sess_idx == 1 => {
+ RuntimeApiRequest::SessionExecutorParams(1, tx),
+ )) => {
tx.send(Ok(Some(ExecutorParams::default()))).unwrap();
},
msg => {
diff --git a/polkadot/node/overseer/examples/minimal-example.rs b/polkadot/node/overseer/examples/minimal-example.rs
index e78941776d..cffdfd9f8a 100644
--- a/polkadot/node/overseer/examples/minimal-example.rs
+++ b/polkadot/node/overseer/examples/minimal-example.rs
@@ -163,7 +163,6 @@ fn main() {
.unwrap();
let overseer_fut = overseer.run().fuse();
- let timer_stream = timer_stream;
pin_mut!(timer_stream);
pin_mut!(overseer_fut);
diff --git a/substrate/client/cli/src/commands/inspect_node_key.rs b/substrate/client/cli/src/commands/inspect_node_key.rs
index 19b5a31ca1..6cf025a2d1 100644
--- a/substrate/client/cli/src/commands/inspect_node_key.rs
+++ b/substrate/client/cli/src/commands/inspect_node_key.rs
@@ -85,7 +85,7 @@ mod tests {
fn inspect_node_key() {
let path = tempfile::tempdir().unwrap().into_path().join("node-id").into_os_string();
let path = path.to_str().unwrap();
- let cmd = GenerateNodeKeyCmd::parse_from(&["generate-node-key", "--file", path.clone()]);
+ let cmd = GenerateNodeKeyCmd::parse_from(&["generate-node-key", "--file", path]);
assert!(cmd.run().is_ok());
diff --git a/substrate/client/network/common/src/role.rs b/substrate/client/network/common/src/role.rs
index cd43f6655b..fd02c00e23 100644
--- a/substrate/client/network/common/src/role.rs
+++ b/substrate/client/network/common/src/role.rs
@@ -16,6 +16,10 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
+// file-level lint whitelist to avoid problem with bitflags macro below
+// TODO: can be dropped after an update to bitflags 2.4
+#![allow(clippy::bad_bit_mask)]
+
use codec::{self, Encode, EncodeLike, Input, Output};
/// Role that the peer sent to us during the handshake, with the addition of what our local node
diff --git a/substrate/client/network/src/protocol/notifications/behaviour.rs b/substrate/client/network/src/protocol/notifications/behaviour.rs
index 89513e004c..b78f15f852 100644
--- a/substrate/client/network/src/protocol/notifications/behaviour.rs
+++ b/substrate/client/network/src/protocol/notifications/behaviour.rs
@@ -1423,7 +1423,6 @@ impl NetworkBehaviour for Notifications {
let delay_id = self.next_delay_id;
self.next_delay_id.0 += 1;
let delay = futures_timer::Delay::new(ban_duration);
- let peer_id = peer_id;
self.delays.push(
async move {
delay.await;
diff --git a/substrate/frame/contracts/src/wasm/prepare.rs b/substrate/frame/contracts/src/wasm/prepare.rs
index b129c17e13..dfe8c4f8f9 100644
--- a/substrate/frame/contracts/src/wasm/prepare.rs
+++ b/substrate/frame/contracts/src/wasm/prepare.rs
@@ -79,8 +79,7 @@ impl LoadedModule {
}
let engine = Engine::new(&config);
- let module =
- Module::new(&engine, code.clone()).map_err(|_| "Can't load the module into wasmi!")?;
+ let module = Module::new(&engine, code).map_err(|_| "Can't load the module into wasmi!")?;
// Return a `LoadedModule` instance with
// __valid__ module.
diff --git a/substrate/frame/nfts/src/tests.rs b/substrate/frame/nfts/src/tests.rs
index 6e264048f1..a82fcca015 100644
--- a/substrate/frame/nfts/src/tests.rs
+++ b/substrate/frame/nfts/src/tests.rs
@@ -17,7 +17,7 @@
//! Tests for Nfts pallet.
-use crate::{mock::*, Event, *};
+use crate::{mock::*, Event, SystemConfig, *};
use enumflags2::BitFlags;
use frame_support::{
assert_noop, assert_ok,
diff --git a/substrate/frame/preimage/src/migration.rs b/substrate/frame/preimage/src/migration.rs
index 821cb01bba..a86109f892 100644
--- a/substrate/frame/preimage/src/migration.rs
+++ b/substrate/frame/preimage/src/migration.rs
@@ -133,7 +133,7 @@ pub mod v1 {
None =>
OldRequestStatus::Requested { deposit: None, count: 1, len: Some(len) },
},
- v0::OldRequestStatus::Requested(count) if count == 0 => {
+ v0::OldRequestStatus::Requested(0) => {
log::error!(target: TARGET, "preimage has counter of zero: {:?}", hash);
continue
},
diff --git a/substrate/frame/support/test/tests/construct_runtime_ui/deprecated_where_block.stderr b/substrate/frame/support/test/tests/construct_runtime_ui/deprecated_where_block.stderr
index cc2c2e1600..08954bb6ab 100644
--- a/substrate/frame/support/test/tests/construct_runtime_ui/deprecated_where_block.stderr
+++ b/substrate/frame/support/test/tests/construct_runtime_ui/deprecated_where_block.stderr
@@ -148,7 +148,11 @@ error[E0277]: the trait bound `Runtime: Config` is not satisfied in `frame_syste
| ||_- in this macro invocation
... |
|
- = note: required because it appears within the type `Event`
+note: required because it appears within the type `Event`
+ --> $WORKSPACE/substrate/frame/system/src/lib.rs
+ |
+ | pub enum Event {
+ | ^^^^^
note: required by a bound in `From`
--> $RUST/core/src/convert/mod.rs
|
@@ -169,7 +173,11 @@ error[E0277]: the trait bound `Runtime: Config` is not satisfied in `frame_syste
| ||_- in this macro invocation
... |
|
- = note: required because it appears within the type `Event`
+note: required because it appears within the type `Event`
+ --> $WORKSPACE/substrate/frame/system/src/lib.rs
+ |
+ | pub enum Event {
+ | ^^^^^
note: required by a bound in `TryInto`
--> $RUST/core/src/convert/mod.rs
|
diff --git a/substrate/frame/support/test/tests/derive_no_bound_ui/debug.stderr b/substrate/frame/support/test/tests/derive_no_bound_ui/debug.stderr
index d86292d71b..3291f658f1 100644
--- a/substrate/frame/support/test/tests/derive_no_bound_ui/debug.stderr
+++ b/substrate/frame/support/test/tests/derive_no_bound_ui/debug.stderr
@@ -5,4 +5,4 @@ error[E0277]: `::C` doesn't implement `std::fmt::Debug`
| ^ `::C` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
|
= help: the trait `std::fmt::Debug` is not implemented for `::C`
- = note: required for the cast from `::C` to the object type `dyn std::fmt::Debug`
+ = note: required for the cast from `&::C` to `&dyn std::fmt::Debug`
diff --git a/substrate/frame/support/test/tests/pallet_ui/call_argument_invalid_bound.stderr b/substrate/frame/support/test/tests/pallet_ui/call_argument_invalid_bound.stderr
index c86930f8a6..08ea7c0bec 100644
--- a/substrate/frame/support/test/tests/pallet_ui/call_argument_invalid_bound.stderr
+++ b/substrate/frame/support/test/tests/pallet_ui/call_argument_invalid_bound.stderr
@@ -19,7 +19,7 @@ error[E0277]: `::Bar` doesn't implement `std::fmt::Debug`
|
= help: the trait `std::fmt::Debug` is not implemented for `::Bar`
= note: required for `&::Bar` to implement `std::fmt::Debug`
- = note: required for the cast from `&::Bar` to the object type `dyn std::fmt::Debug`
+ = note: required for the cast from `&&::Bar` to `&dyn std::fmt::Debug`
error[E0277]: the trait bound `::Bar: Clone` is not satisfied
--> tests/pallet_ui/call_argument_invalid_bound.rs:38:36
diff --git a/substrate/frame/support/test/tests/pallet_ui/call_argument_invalid_bound_2.stderr b/substrate/frame/support/test/tests/pallet_ui/call_argument_invalid_bound_2.stderr
index 1b04f44c78..80316fcd24 100644
--- a/substrate/frame/support/test/tests/pallet_ui/call_argument_invalid_bound_2.stderr
+++ b/substrate/frame/support/test/tests/pallet_ui/call_argument_invalid_bound_2.stderr
@@ -19,7 +19,7 @@ error[E0277]: `::Bar` doesn't implement `std::fmt::Debug`
|
= help: the trait `std::fmt::Debug` is not implemented for `::Bar`
= note: required for `&::Bar` to implement `std::fmt::Debug`
- = note: required for the cast from `&::Bar` to the object type `dyn std::fmt::Debug`
+ = note: required for the cast from `&&::Bar` to `&dyn std::fmt::Debug`
error[E0277]: the trait bound `::Bar: Clone` is not satisfied
--> tests/pallet_ui/call_argument_invalid_bound_2.rs:38:36
diff --git a/substrate/frame/support/test/tests/pallet_ui/call_argument_invalid_bound_3.stderr b/substrate/frame/support/test/tests/pallet_ui/call_argument_invalid_bound_3.stderr
index 7429bce050..d45b74bad8 100644
--- a/substrate/frame/support/test/tests/pallet_ui/call_argument_invalid_bound_3.stderr
+++ b/substrate/frame/support/test/tests/pallet_ui/call_argument_invalid_bound_3.stderr
@@ -20,7 +20,7 @@ error[E0277]: `Bar` doesn't implement `std::fmt::Debug`
= help: the trait `std::fmt::Debug` is not implemented for `Bar`
= note: add `#[derive(Debug)]` to `Bar` or manually `impl std::fmt::Debug for Bar`
= note: required for `&Bar` to implement `std::fmt::Debug`
- = note: required for the cast from `&Bar` to the object type `dyn std::fmt::Debug`
+ = note: required for the cast from `&&Bar` to `&dyn std::fmt::Debug`
help: consider annotating `Bar` with `#[derive(Debug)]`
|
34 + #[derive(Debug)]
diff --git a/substrate/frame/support/test/tests/pallet_ui/dev_mode_without_arg_max_encoded_len.stderr b/substrate/frame/support/test/tests/pallet_ui/dev_mode_without_arg_max_encoded_len.stderr
index 74ee0e4aeb..531e8bdffe 100644
--- a/substrate/frame/support/test/tests/pallet_ui/dev_mode_without_arg_max_encoded_len.stderr
+++ b/substrate/frame/support/test/tests/pallet_ui/dev_mode_without_arg_max_encoded_len.stderr
@@ -30,13 +30,13 @@ error[E0277]: the trait bound `Vec: MaxEncodedLen` is not satisfied
| ^^^^^^ the trait `MaxEncodedLen` is not implemented for `Vec`
|
= help: the following other types implement trait `MaxEncodedLen`:
- ()
- (TupleElement0, TupleElement1)
- (TupleElement0, TupleElement1, TupleElement2)
- (TupleElement0, TupleElement1, TupleElement2, TupleElement3)
- (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4)
- (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5)
- (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6)
- (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7)
+ bool
+ i8
+ i16
+ i32
+ i64
+ i128
+ u8
+ u16
and $N others
= note: required for `frame_support::pallet_prelude::StorageValue<_GeneratedPrefixForStorageMyStorage, Vec>` to implement `StorageInfoTrait`
diff --git a/substrate/frame/support/test/tests/pallet_ui/error_does_not_derive_pallet_error.stderr b/substrate/frame/support/test/tests/pallet_ui/error_does_not_derive_pallet_error.stderr
index cfa0d46599..ea1d0ed99c 100644
--- a/substrate/frame/support/test/tests/pallet_ui/error_does_not_derive_pallet_error.stderr
+++ b/substrate/frame/support/test/tests/pallet_ui/error_does_not_derive_pallet_error.stderr
@@ -5,13 +5,13 @@ error[E0277]: the trait bound `MyError: PalletError` is not satisfied
| ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `PalletError` is not implemented for `MyError`
|
= help: the following other types implement trait `PalletError`:
- ()
- (TupleElement0, TupleElement1)
- (TupleElement0, TupleElement1, TupleElement2)
- (TupleElement0, TupleElement1, TupleElement2, TupleElement3)
- (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4)
- (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5)
- (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6)
- (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7)
+ bool
+ i8
+ i16
+ i32
+ i64
+ i128
+ u8
+ u16
and $N others
= note: this error originates in the derive macro `frame_support::PalletError` (in Nightly builds, run with -Z macro-backtrace for more info)
diff --git a/substrate/frame/support/test/tests/pallet_ui/event_field_not_member.stderr b/substrate/frame/support/test/tests/pallet_ui/event_field_not_member.stderr
index 4df6deafa0..fc4a33b721 100644
--- a/substrate/frame/support/test/tests/pallet_ui/event_field_not_member.stderr
+++ b/substrate/frame/support/test/tests/pallet_ui/event_field_not_member.stderr
@@ -18,4 +18,4 @@ error[E0277]: `::Bar` doesn't implement `std::fmt::Debug`
|
= help: the trait `std::fmt::Debug` is not implemented for `::Bar`
= note: required for `&::Bar` to implement `std::fmt::Debug`
- = note: required for the cast from `&::Bar` to the object type `dyn std::fmt::Debug`
+ = note: required for the cast from `&&::Bar` to `&dyn std::fmt::Debug`
diff --git a/substrate/frame/support/test/tests/pallet_ui/inherent_check_inner_span.stderr b/substrate/frame/support/test/tests/pallet_ui/inherent_check_inner_span.stderr
index 3a26d1c049..5ea3be470a 100644
--- a/substrate/frame/support/test/tests/pallet_ui/inherent_check_inner_span.stderr
+++ b/substrate/frame/support/test/tests/pallet_ui/inherent_check_inner_span.stderr
@@ -4,8 +4,8 @@ error[E0046]: not all trait items implemented, missing: `Call`, `Error`, `INHERE
36 | impl ProvideInherent for Pallet {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `Call`, `Error`, `INHERENT_IDENTIFIER`, `create_inherent`, `is_inherent` in implementation
|
- = help: implement the missing item: `type Call = Type;`
- = help: implement the missing item: `type Error = Type;`
+ = help: implement the missing item: `type Call = /* Type */;`
+ = help: implement the missing item: `type Error = /* Type */;`
= help: implement the missing item: `const INHERENT_IDENTIFIER: [u8; 8] = value;`
= help: implement the missing item: `fn create_inherent(_: &InherentData) -> std::option::Option<::Call> { todo!() }`
= help: implement the missing item: `fn is_inherent(_: &::Call) -> bool { todo!() }`
diff --git a/substrate/frame/support/test/tests/pallet_ui/storage_ensure_span_are_ok_on_wrong_gen.stderr b/substrate/frame/support/test/tests/pallet_ui/storage_ensure_span_are_ok_on_wrong_gen.stderr
index e290b22a0e..930af1d7fc 100644
--- a/substrate/frame/support/test/tests/pallet_ui/storage_ensure_span_are_ok_on_wrong_gen.stderr
+++ b/substrate/frame/support/test/tests/pallet_ui/storage_ensure_span_are_ok_on_wrong_gen.stderr
@@ -5,10 +5,10 @@ error[E0277]: the trait bound `Bar: WrapperTypeDecode` is not satisfied
| ^^^^^^^^^^^^^^^^^^^^ the trait `WrapperTypeDecode` is not implemented for `Bar`
|
= help: the following other types implement trait `WrapperTypeDecode`:
- Arc
Box
- Rc
frame_support::sp_runtime::sp_application_crypto::sp_core::Bytes
+ Rc
+ Arc
= note: required for `Bar` to implement `Decode`
= note: required for `Bar` to implement `FullCodec`
= note: required for `frame_support::pallet_prelude::StorageValue<_GeneratedPrefixForStorageFoo, Bar>` to implement `PartialStorageInfoTrait`
@@ -20,14 +20,14 @@ error[E0277]: the trait bound `Bar: EncodeLike` is not satisfied
| ^^^^^^^^^^^^^^^^^^^^ the trait `EncodeLike` is not implemented for `Bar`
|
= help: the following other types implement trait `EncodeLike`:
- <&&T as EncodeLike>
- <&T as EncodeLike>
- <&T as EncodeLike>
- <&[(K, V)] as EncodeLike>>
- <&[(T,)] as EncodeLike>>
- <&[(T,)] as EncodeLike>>
- <&[(T,)] as EncodeLike>>
- <&[T] as EncodeLike>>
+
+
+
+
+
+
+
+
and $N others
= note: required for `Bar` to implement `FullEncode`
= note: required for `Bar` to implement `FullCodec`
@@ -40,14 +40,14 @@ error[E0277]: the trait bound `Bar: WrapperTypeEncode` is not satisfied
| ^^^^^^^^^^^^^^^^^^^^ the trait `WrapperTypeEncode` is not implemented for `Bar`
|
= help: the following other types implement trait `WrapperTypeEncode`:
- &T
- &mut T
- Arc
Box
- Cow<'a, T>
- Rc
- Vec
bytes::bytes::Bytes
+ Cow<'a, T>
+ parity_scale_codec::Ref<'a, T, U>
+ frame_support::sp_runtime::sp_application_crypto::sp_core::Bytes
+ Rc
+ Arc
+ Vec
and $N others
= note: required for `Bar` to implement `Encode`
= note: required for `Bar` to implement `FullEncode`
@@ -61,14 +61,14 @@ error[E0277]: the trait bound `Bar: TypeInfo` is not satisfied
| ^^^^^^^ the trait `TypeInfo` is not implemented for `Bar`
|
= help: the following other types implement trait `TypeInfo`:
- &T
- &mut T
- ()
- (A, B)
- (A, B, C)
- (A, B, C, D)
- (A, B, C, D, E)
- (A, B, C, D, E, F)
+ bool
+ char
+ i8
+ i16
+ i32
+ i64
+ i128
+ u8
and $N others
= note: required for `Bar` to implement `StaticTypeInfo`
= note: required for `frame_support::pallet_prelude::StorageValue<_GeneratedPrefixForStorageFoo, Bar>` to implement `StorageEntryMetadataBuilder`
@@ -80,10 +80,10 @@ error[E0277]: the trait bound `Bar: WrapperTypeDecode` is not satisfied
| ^^^^^^^ the trait `WrapperTypeDecode` is not implemented for `Bar`
|
= help: the following other types implement trait `WrapperTypeDecode`:
- Arc
Box
- Rc
frame_support::sp_runtime::sp_application_crypto::sp_core::Bytes
+ Rc
+ Arc
= note: required for `Bar` to implement `Decode`
= note: required for `Bar` to implement `FullCodec`
= note: required for `frame_support::pallet_prelude::StorageValue<_GeneratedPrefixForStorageFoo, Bar>` to implement `StorageEntryMetadataBuilder`
@@ -95,14 +95,14 @@ error[E0277]: the trait bound `Bar: EncodeLike` is not satisfied
| ^^^^^^^ the trait `EncodeLike` is not implemented for `Bar`
|
= help: the following other types implement trait `EncodeLike`:
- <&&T as EncodeLike>
- <&T as EncodeLike>
- <&T as EncodeLike>
- <&[(K, V)] as EncodeLike>>
- <&[(T,)] as EncodeLike>>
- <&[(T,)] as EncodeLike>>
- <&[(T,)] as EncodeLike>>
- <&[T] as EncodeLike>>
+
+
+
+
+
+
+
+
and $N others
= note: required for `Bar` to implement `FullEncode`
= note: required for `Bar` to implement `FullCodec`
@@ -115,14 +115,14 @@ error[E0277]: the trait bound `Bar: WrapperTypeEncode` is not satisfied
| ^^^^^^^ the trait `WrapperTypeEncode` is not implemented for `Bar`
|
= help: the following other types implement trait `WrapperTypeEncode`:
- &T
- &mut T
- Arc
Box
- Cow<'a, T>
- Rc
- Vec
bytes::bytes::Bytes
+ Cow<'a, T>
+ parity_scale_codec::Ref<'a, T, U>
+ frame_support::sp_runtime::sp_application_crypto::sp_core::Bytes
+ Rc
+ Arc
+ Vec
and $N others
= note: required for `Bar` to implement `Encode`
= note: required for `Bar` to implement `FullEncode`
diff --git a/substrate/frame/support/test/tests/pallet_ui/storage_ensure_span_are_ok_on_wrong_gen_unnamed.stderr b/substrate/frame/support/test/tests/pallet_ui/storage_ensure_span_are_ok_on_wrong_gen_unnamed.stderr
index 0e3a7c9f1c..79798963c8 100644
--- a/substrate/frame/support/test/tests/pallet_ui/storage_ensure_span_are_ok_on_wrong_gen_unnamed.stderr
+++ b/substrate/frame/support/test/tests/pallet_ui/storage_ensure_span_are_ok_on_wrong_gen_unnamed.stderr
@@ -5,10 +5,10 @@ error[E0277]: the trait bound `Bar: WrapperTypeDecode` is not satisfied
| ^^^^^^^^^^^^^^^^^^^^ the trait `WrapperTypeDecode` is not implemented for `Bar`
|
= help: the following other types implement trait `WrapperTypeDecode`:
- Arc
Box
- Rc
frame_support::sp_runtime::sp_application_crypto::sp_core::Bytes
+ Rc
+ Arc
= note: required for `Bar` to implement `Decode`
= note: required for `Bar` to implement `FullCodec`
= note: required for `frame_support::pallet_prelude::StorageValue<_GeneratedPrefixForStorageFoo, Bar>` to implement `PartialStorageInfoTrait`
@@ -20,14 +20,14 @@ error[E0277]: the trait bound `Bar: EncodeLike` is not satisfied
| ^^^^^^^^^^^^^^^^^^^^ the trait `EncodeLike` is not implemented for `Bar`
|
= help: the following other types implement trait `EncodeLike`:
- <&&T as EncodeLike>
- <&T as EncodeLike>
- <&T as EncodeLike>
- <&[(K, V)] as EncodeLike>>
- <&[(T,)] as EncodeLike>>
- <&[(T,)] as EncodeLike>>
- <&[(T,)] as EncodeLike>>
- <&[T] as EncodeLike>>
+
+
+
+
+
+
+
+
and $N others
= note: required for `Bar` to implement `FullEncode`
= note: required for `Bar` to implement `FullCodec`
@@ -40,14 +40,14 @@ error[E0277]: the trait bound `Bar: WrapperTypeEncode` is not satisfied
| ^^^^^^^^^^^^^^^^^^^^ the trait `WrapperTypeEncode` is not implemented for `Bar`
|
= help: the following other types implement trait `WrapperTypeEncode`:
- &T
- &mut T
- Arc
Box
- Cow<'a, T>
- Rc
- Vec
bytes::bytes::Bytes
+ Cow<'a, T>
+ parity_scale_codec::Ref<'a, T, U>
+ frame_support::sp_runtime::sp_application_crypto::sp_core::Bytes
+ Rc
+ Arc
+ Vec
and $N others
= note: required for `Bar` to implement `Encode`
= note: required for `Bar` to implement `FullEncode`
@@ -61,14 +61,14 @@ error[E0277]: the trait bound `Bar: TypeInfo` is not satisfied
| ^^^^^^^ the trait `TypeInfo` is not implemented for `Bar`
|
= help: the following other types implement trait `TypeInfo`:
- &T
- &mut T
- ()
- (A, B)
- (A, B, C)
- (A, B, C, D)
- (A, B, C, D, E)
- (A, B, C, D, E, F)
+ bool
+ char
+ i8
+ i16
+ i32
+ i64
+ i128
+ u8
and $N others
= note: required for `Bar` to implement `StaticTypeInfo`
= note: required for `frame_support::pallet_prelude::StorageValue<_GeneratedPrefixForStorageFoo, Bar>` to implement `StorageEntryMetadataBuilder`
@@ -80,10 +80,10 @@ error[E0277]: the trait bound `Bar: WrapperTypeDecode` is not satisfied
| ^^^^^^^ the trait `WrapperTypeDecode` is not implemented for `Bar`
|
= help: the following other types implement trait `WrapperTypeDecode`:
- Arc
Box
- Rc
frame_support::sp_runtime::sp_application_crypto::sp_core::Bytes
+ Rc
+ Arc
= note: required for `Bar` to implement `Decode`
= note: required for `Bar` to implement `FullCodec`
= note: required for `frame_support::pallet_prelude::StorageValue<_GeneratedPrefixForStorageFoo, Bar>` to implement `StorageEntryMetadataBuilder`
@@ -95,14 +95,14 @@ error[E0277]: the trait bound `Bar: EncodeLike` is not satisfied
| ^^^^^^^ the trait `EncodeLike` is not implemented for `Bar`
|
= help: the following other types implement trait `EncodeLike`:
- <&&T as EncodeLike>
- <&T as EncodeLike>
- <&T as EncodeLike>
- <&[(K, V)] as EncodeLike>>
- <&[(T,)] as EncodeLike>>
- <&[(T,)] as EncodeLike>>
- <&[(T,)] as EncodeLike>>
- <&[T] as EncodeLike>>
+
+
+
+
+
+
+
+
and $N others
= note: required for `Bar` to implement `FullEncode`
= note: required for `Bar` to implement `FullCodec`
@@ -115,14 +115,14 @@ error[E0277]: the trait bound `Bar: WrapperTypeEncode` is not satisfied
| ^^^^^^^ the trait `WrapperTypeEncode` is not implemented for `Bar`
|
= help: the following other types implement trait `WrapperTypeEncode`:
- &T
- &mut T
- Arc
Box
- Cow<'a, T>
- Rc
- Vec
bytes::bytes::Bytes
+ Cow<'a, T>
+ parity_scale_codec::Ref<'a, T, U>
+ frame_support::sp_runtime::sp_application_crypto::sp_core::Bytes
+ Rc
+ Arc
+ Vec
and $N others
= note: required for `Bar` to implement `Encode`
= note: required for `Bar` to implement `FullEncode`
diff --git a/substrate/frame/support/test/tests/pallet_ui/storage_info_unsatisfied.stderr b/substrate/frame/support/test/tests/pallet_ui/storage_info_unsatisfied.stderr
index 9a31e4b6bd..e04de98800 100644
--- a/substrate/frame/support/test/tests/pallet_ui/storage_info_unsatisfied.stderr
+++ b/substrate/frame/support/test/tests/pallet_ui/storage_info_unsatisfied.stderr
@@ -5,13 +5,13 @@ error[E0277]: the trait bound `Bar: MaxEncodedLen` is not satisfied
| ^^^^^^ the trait `MaxEncodedLen` is not implemented for `Bar`
|
= help: the following other types implement trait `MaxEncodedLen`:
- ()
- (TupleElement0, TupleElement1)
- (TupleElement0, TupleElement1, TupleElement2)
- (TupleElement0, TupleElement1, TupleElement2, TupleElement3)
- (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4)
- (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5)
- (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6)
- (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7)
+ bool
+ i8
+ i16
+ i32
+ i64
+ i128
+ u8
+ u16
and $N others
= note: required for `frame_support::pallet_prelude::StorageValue<_GeneratedPrefixForStorageFoo, Bar>` to implement `StorageInfoTrait`
diff --git a/substrate/frame/support/test/tests/pallet_ui/storage_info_unsatisfied_nmap.stderr b/substrate/frame/support/test/tests/pallet_ui/storage_info_unsatisfied_nmap.stderr
index cdcd1b401f..31fe3b5733 100644
--- a/substrate/frame/support/test/tests/pallet_ui/storage_info_unsatisfied_nmap.stderr
+++ b/substrate/frame/support/test/tests/pallet_ui/storage_info_unsatisfied_nmap.stderr
@@ -5,14 +5,14 @@ error[E0277]: the trait bound `Bar: MaxEncodedLen` is not satisfied
| ^^^^^^ the trait `MaxEncodedLen` is not implemented for `Bar`
|
= help: the following other types implement trait `MaxEncodedLen`:
- ()
- (TupleElement0, TupleElement1)
- (TupleElement0, TupleElement1, TupleElement2)
- (TupleElement0, TupleElement1, TupleElement2, TupleElement3)
- (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4)
- (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5)
- (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6)
- (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7)
+ bool
+ i8
+ i16
+ i32
+ i64
+ i128
+ u8
+ u16
and $N others
- = note: required for `Key` to implement `KeyGeneratorMaxEncodedLen`
- = note: required for `frame_support::pallet_prelude::StorageNMap<_GeneratedPrefixForStorageFoo, Key, u32>` to implement `StorageInfoTrait`
+ = note: required for `NMapKey` to implement `KeyGeneratorMaxEncodedLen`
+ = note: required for `frame_support::pallet_prelude::StorageNMap<_GeneratedPrefixForStorageFoo, NMapKey, u32>` to implement `StorageInfoTrait`
diff --git a/substrate/primitives/npos-elections/src/lib.rs b/substrate/primitives/npos-elections/src/lib.rs
index 0afe1ec5bb..62ae050211 100644
--- a/substrate/primitives/npos-elections/src/lib.rs
+++ b/substrate/primitives/npos-elections/src/lib.rs
@@ -19,7 +19,7 @@
//! - [`seq_phragmen`]: Implements the Phragmén Sequential Method. An un-ranked, relatively fast
//! election method that ensures PJR, but does not provide a constant factor approximation of the
//! maximin problem.
-//! - [`phragmms`](phragmms::phragmms): Implements a hybrid approach inspired by Phragmén which is
+//! - [`ghragmms`](phragmms::phragmms()): Implements a hybrid approach inspired by Phragmén which is
//! executed faster but it can achieve a constant factor approximation of the maximin problem,
//! similar to that of the MMS algorithm.
//! - [`balance`](balancing::balance): Implements the star balancing algorithm. This iterative
diff --git a/substrate/primitives/runtime-interface/tests/ui/no_feature_gated_method.stderr b/substrate/primitives/runtime-interface/tests/ui/no_feature_gated_method.stderr
index 23e671f6ce..10012ede79 100644
--- a/substrate/primitives/runtime-interface/tests/ui/no_feature_gated_method.stderr
+++ b/substrate/primitives/runtime-interface/tests/ui/no_feature_gated_method.stderr
@@ -3,3 +3,15 @@ error[E0425]: cannot find function `bar` in module `test`
|
33 | test::bar();
| ^^^ not found in `test`
+ |
+note: found an item that was configured out
+ --> tests/ui/no_feature_gated_method.rs:25:5
+ |
+25 | fn bar() {}
+ | ^^^
+ = note: the item is gated behind the `bar-feature` feature
+note: found an item that was configured out
+ --> tests/ui/no_feature_gated_method.rs:25:5
+ |
+25 | fn bar() {}
+ | ^^^
diff --git a/substrate/utils/frame/benchmarking-cli/src/pallet/writer.rs b/substrate/utils/frame/benchmarking-cli/src/pallet/writer.rs
index 69c95d13c0..9493a693bb 100644
--- a/substrate/utils/frame/benchmarking-cli/src/pallet/writer.rs
+++ b/substrate/utils/frame/benchmarking-cli/src/pallet/writer.rs
@@ -779,6 +779,7 @@ fn worst_case_pov(
/// A simple match statement which outputs the log 16 of some value.
fn easy_log_16(i: u32) -> u32 {
+ #[allow(clippy::redundant_guards)]
match i {
i if i == 0 => 0,
i if i <= 16 => 1,