Skip to content

Commit

Permalink
ci: bump ci image to rust 1.73.0 (paritytech#1830)
Browse files Browse the repository at this point in the history
Co-authored-by: command-bot <>
  • Loading branch information
Mira Ressel authored and acatangiu committed Oct 31, 2023
1 parent 2654507 commit 8842a5c
Show file tree
Hide file tree
Showing 28 changed files with 156 additions and 129 deletions.
8 changes: 7 additions & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -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`.
Expand Down Expand Up @@ -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
]
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion .gitlab/pipeline/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ build-rustdoc:
- .run-immediately
variables:
SKIP_WASM_BUILD: 1
RUSTDOCFLAGS: ""
artifacts:
name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}-doc"
when: on_success
Expand All @@ -93,7 +94,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
Expand Down
1 change: 0 additions & 1 deletion .gitlab/pipeline/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions polkadot/node/core/backing/src/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down
1 change: 0 additions & 1 deletion polkadot/node/overseer/examples/minimal-example.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion substrate/client/cli/src/commands/inspect_node_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());

Expand Down
4 changes: 4 additions & 0 deletions substrate/client/network/common/src/role.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.

// 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions substrate/frame/contracts/src/wasm/prepare.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion substrate/frame/nfts/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion substrate/frame/preimage/src/migration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Runtime>`
note: required because it appears within the type `Event<Runtime>`
--> $WORKSPACE/substrate/frame/system/src/lib.rs
|
| pub enum Event<T: Config> {
| ^^^^^
note: required by a bound in `From`
--> $RUST/core/src/convert/mod.rs
|
Expand All @@ -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<Runtime>`
note: required because it appears within the type `Event<Runtime>`
--> $WORKSPACE/substrate/frame/system/src/lib.rs
|
| pub enum Event<T: Config> {
| ^^^^^
note: required by a bound in `TryInto`
--> $RUST/core/src/convert/mod.rs
|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ error[E0277]: `<T as Config>::C` doesn't implement `std::fmt::Debug`
| ^ `<T as Config>::C` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
|
= help: the trait `std::fmt::Debug` is not implemented for `<T as Config>::C`
= note: required for the cast from `<T as Config>::C` to the object type `dyn std::fmt::Debug`
= note: required for the cast from `&<T as Config>::C` to `&dyn std::fmt::Debug`
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ error[E0277]: `<T as pallet::Config>::Bar` doesn't implement `std::fmt::Debug`
|
= help: the trait `std::fmt::Debug` is not implemented for `<T as pallet::Config>::Bar`
= note: required for `&<T as pallet::Config>::Bar` to implement `std::fmt::Debug`
= note: required for the cast from `&<T as pallet::Config>::Bar` to the object type `dyn std::fmt::Debug`
= note: required for the cast from `&&<T as pallet::Config>::Bar` to `&dyn std::fmt::Debug`

error[E0277]: the trait bound `<T as pallet::Config>::Bar: Clone` is not satisfied
--> tests/pallet_ui/call_argument_invalid_bound.rs:38:36
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ error[E0277]: `<T as pallet::Config>::Bar` doesn't implement `std::fmt::Debug`
|
= help: the trait `std::fmt::Debug` is not implemented for `<T as pallet::Config>::Bar`
= note: required for `&<T as pallet::Config>::Bar` to implement `std::fmt::Debug`
= note: required for the cast from `&<T as pallet::Config>::Bar` to the object type `dyn std::fmt::Debug`
= note: required for the cast from `&&<T as pallet::Config>::Bar` to `&dyn std::fmt::Debug`

error[E0277]: the trait bound `<T as pallet::Config>::Bar: Clone` is not satisfied
--> tests/pallet_ui/call_argument_invalid_bound_2.rs:38:36
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ error[E0277]: the trait bound `Vec<u8>: MaxEncodedLen` is not satisfied
| ^^^^^^ the trait `MaxEncodedLen` is not implemented for `Vec<u8>`
|
= 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<T>, Vec<u8>>` to implement `StorageInfoTrait`
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ error[E0277]: `<T as pallet::Config>::Bar` doesn't implement `std::fmt::Debug`
|
= help: the trait `std::fmt::Debug` is not implemented for `<T as pallet::Config>::Bar`
= note: required for `&<T as pallet::Config>::Bar` to implement `std::fmt::Debug`
= note: required for the cast from `&<T as pallet::Config>::Bar` to the object type `dyn std::fmt::Debug`
= note: required for the cast from `&&<T as pallet::Config>::Bar` to `&dyn std::fmt::Debug`
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ error[E0046]: not all trait items implemented, missing: `Call`, `Error`, `INHERE
36 | impl<T: Config> ProvideInherent for Pallet<T> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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<<Self as ProvideInherent>::Call> { todo!() }`
= help: implement the missing item: `fn is_inherent(_: &<Self as ProvideInherent>::Call) -> bool { todo!() }`
Original file line number Diff line number Diff line change
Expand Up @@ -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<T>
Box<T>
Rc<T>
frame_support::sp_runtime::sp_application_crypto::sp_core::Bytes
Rc<T>
Arc<T>
= note: required for `Bar` to implement `Decode`
= note: required for `Bar` to implement `FullCodec`
= note: required for `frame_support::pallet_prelude::StorageValue<_GeneratedPrefixForStorageFoo<T>, Bar>` to implement `PartialStorageInfoTrait`
Expand All @@ -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>`:
<&&T as EncodeLike<T>>
<&T as EncodeLike<T>>
<&T as EncodeLike>
<&[(K, V)] as EncodeLike<BTreeMap<LikeK, LikeV>>>
<&[(T,)] as EncodeLike<BTreeSet<LikeT>>>
<&[(T,)] as EncodeLike<BinaryHeap<LikeT>>>
<&[(T,)] as EncodeLike<LinkedList<LikeT>>>
<&[T] as EncodeLike<Vec<U>>>
<bool as EncodeLike>
<i8 as EncodeLike>
<i16 as EncodeLike>
<i32 as EncodeLike>
<i64 as EncodeLike>
<i128 as EncodeLike>
<u8 as EncodeLike>
<u16 as EncodeLike>
and $N others
= note: required for `Bar` to implement `FullEncode`
= note: required for `Bar` to implement `FullCodec`
Expand All @@ -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<T>
Box<T>
bytes::bytes::Bytes
Cow<'a, T>
parity_scale_codec::Ref<'a, T, U>
frame_support::sp_runtime::sp_application_crypto::sp_core::Bytes
Rc<T>
Arc<T>
Vec<T>
bytes::bytes::Bytes
and $N others
= note: required for `Bar` to implement `Encode`
= note: required for `Bar` to implement `FullEncode`
Expand All @@ -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<T>, Bar>` to implement `StorageEntryMetadataBuilder`
Expand All @@ -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<T>
Box<T>
Rc<T>
frame_support::sp_runtime::sp_application_crypto::sp_core::Bytes
Rc<T>
Arc<T>
= note: required for `Bar` to implement `Decode`
= note: required for `Bar` to implement `FullCodec`
= note: required for `frame_support::pallet_prelude::StorageValue<_GeneratedPrefixForStorageFoo<T>, Bar>` to implement `StorageEntryMetadataBuilder`
Expand All @@ -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>`:
<&&T as EncodeLike<T>>
<&T as EncodeLike<T>>
<&T as EncodeLike>
<&[(K, V)] as EncodeLike<BTreeMap<LikeK, LikeV>>>
<&[(T,)] as EncodeLike<BTreeSet<LikeT>>>
<&[(T,)] as EncodeLike<BinaryHeap<LikeT>>>
<&[(T,)] as EncodeLike<LinkedList<LikeT>>>
<&[T] as EncodeLike<Vec<U>>>
<bool as EncodeLike>
<i8 as EncodeLike>
<i16 as EncodeLike>
<i32 as EncodeLike>
<i64 as EncodeLike>
<i128 as EncodeLike>
<u8 as EncodeLike>
<u16 as EncodeLike>
and $N others
= note: required for `Bar` to implement `FullEncode`
= note: required for `Bar` to implement `FullCodec`
Expand All @@ -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<T>
Box<T>
bytes::bytes::Bytes
Cow<'a, T>
parity_scale_codec::Ref<'a, T, U>
frame_support::sp_runtime::sp_application_crypto::sp_core::Bytes
Rc<T>
Arc<T>
Vec<T>
bytes::bytes::Bytes
and $N others
= note: required for `Bar` to implement `Encode`
= note: required for `Bar` to implement `FullEncode`
Expand Down
Loading

0 comments on commit 8842a5c

Please sign in to comment.