diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 471f61fa..b729d394 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ on: pull_request: env: - IMAGE: paritytech/ci-unified:bullseye-1.79.0 + IMAGE: paritytech/ci-unified:bullseye-1.81.0 concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true diff --git a/Cargo.lock b/Cargo.lock index e7dc33cb..12f52f78 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -19,9 +19,9 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" [[package]] name = "arbitrary" -version = "1.3.2" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" +checksum = "775a8770d29db3dadcb858482cc240af7b2ffde4ac4de67d1d4955728103f0e2" dependencies = [ "derive_arbitrary", ] @@ -264,9 +264,9 @@ dependencies = [ [[package]] name = "derive_arbitrary" -version = "1.3.2" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" +checksum = "d475dfebcb4854d596b17b09f477616f80f17a550517f2b3615d8c205d5c802b" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 4b8490cc..85ed39a1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ bitvec = { version = "1", default-features = false, features = ["alloc"], option bytes = { version = "1", default-features = false, optional = true } byte-slice-cast = { version = "1.2.2", default-features = false } generic-array = { version = "0.14.7", optional = true } -arbitrary = { version = "1.3.2", features = ["derive"], optional = true } +arbitrary = { version = "1.4.0", features = ["derive"], optional = true } impl-trait-for-tuples = "0.2.2" [dev-dependencies] diff --git a/derive/src/lib.rs b/derive/src/lib.rs index 2f9ea7d9..8ba6d3de 100644 --- a/derive/src/lib.rs +++ b/derive/src/lib.rs @@ -94,8 +94,8 @@ fn wrap_with_dummy_const( /// * if variant has attribute: `#[codec(index = "$n")]` then n /// * else if variant has discriminant (like 3 in `enum T { A = 3 }`) then the discriminant. /// * else its position in the variant set, excluding skipped variants, but including variant with -/// discriminant or attribute. Warning this position does collision with discriminant or attribute -/// index. +/// discriminant or attribute. Warning this position does collision with discriminant or attribute +/// index. /// /// variant attributes: /// * `#[codec(skip)]`: the variant is not encoded. diff --git a/fuzzer/Cargo.toml b/fuzzer/Cargo.toml index 56642e4d..c09ad16e 100644 --- a/fuzzer/Cargo.toml +++ b/fuzzer/Cargo.toml @@ -9,5 +9,5 @@ publish = false [dependencies] parity-scale-codec = { path = "..", features = ["derive", "bit-vec", "fuzz"] } honggfuzz = "0.5.56" -arbitrary = { version = "1.3.2", features = ["derive"] } +arbitrary = { version = "1.4.0", features = ["derive"] } bitvec = { version = "1", features = ["alloc"] } diff --git a/tests/max_encoded_len_ui/crate_str.stderr b/tests/max_encoded_len_ui/crate_str.stderr index a90fdb79..c4e4aafe 100644 --- a/tests/max_encoded_len_ui/crate_str.stderr +++ b/tests/max_encoded_len_ui/crate_str.stderr @@ -10,16 +10,16 @@ error[E0277]: the trait bound `Example: Encode` is not satisfied 5 | struct Example; | ^^^^^^^ the trait `WrapperTypeEncode` is not implemented for `Example`, which is required by `Example: Encode` | - = help: the following other types implement trait `Encode`: - () - (A0, B0, C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) - (B0, C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) - (C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) - (D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) - (E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) - (F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) - (G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) - and $N others + = help: the following other types implement trait `WrapperTypeEncode`: + &T + &mut T + Arc + Box + Cow<'a, T> + Rc + String + Vec + parity_scale_codec::Ref<'a, T, U> = note: required for `Example` to implement `Encode` note: required by a bound in `MaxEncodedLen` --> src/max_encoded_len.rs @@ -33,16 +33,16 @@ error[E0277]: the trait bound `Example: Encode` is not satisfied 8 | let _ = Example::max_encoded_len(); | ^^^^^^^ the trait `WrapperTypeEncode` is not implemented for `Example`, which is required by `Example: Encode` | - = help: the following other types implement trait `Encode`: - () - (A0, B0, C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) - (B0, C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) - (C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) - (D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) - (E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) - (F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) - (G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) - and $N others + = help: the following other types implement trait `WrapperTypeEncode`: + &T + &mut T + Arc + Box + Cow<'a, T> + Rc + String + Vec + parity_scale_codec::Ref<'a, T, U> = note: required for `Example` to implement `Encode` note: required by a bound in `max_encoded_len` --> src/max_encoded_len.rs diff --git a/tests/max_encoded_len_ui/incomplete_attr.stderr b/tests/max_encoded_len_ui/incomplete_attr.stderr index 2f17bdbf..782260fd 100644 --- a/tests/max_encoded_len_ui/incomplete_attr.stderr +++ b/tests/max_encoded_len_ui/incomplete_attr.stderr @@ -10,16 +10,16 @@ error[E0277]: the trait bound `Example: Encode` is not satisfied 5 | struct Example; | ^^^^^^^ the trait `WrapperTypeEncode` is not implemented for `Example`, which is required by `Example: Encode` | - = help: the following other types implement trait `Encode`: - () - (A0, B0, C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) - (B0, C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) - (C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) - (D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) - (E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) - (F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) - (G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) - and $N others + = help: the following other types implement trait `WrapperTypeEncode`: + &T + &mut T + Arc + Box + Cow<'a, T> + Rc + String + Vec + parity_scale_codec::Ref<'a, T, U> = note: required for `Example` to implement `Encode` note: required by a bound in `MaxEncodedLen` --> src/max_encoded_len.rs @@ -33,16 +33,16 @@ error[E0277]: the trait bound `Example: Encode` is not satisfied 8 | let _ = Example::max_encoded_len(); | ^^^^^^^ the trait `WrapperTypeEncode` is not implemented for `Example`, which is required by `Example: Encode` | - = help: the following other types implement trait `Encode`: - () - (A0, B0, C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) - (B0, C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) - (C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) - (D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) - (E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) - (F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) - (G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) - and $N others + = help: the following other types implement trait `WrapperTypeEncode`: + &T + &mut T + Arc + Box + Cow<'a, T> + Rc + String + Vec + parity_scale_codec::Ref<'a, T, U> = note: required for `Example` to implement `Encode` note: required by a bound in `max_encoded_len` --> src/max_encoded_len.rs diff --git a/tests/max_encoded_len_ui/missing_crate_specifier.stderr b/tests/max_encoded_len_ui/missing_crate_specifier.stderr index ab5a74aa..3486966a 100644 --- a/tests/max_encoded_len_ui/missing_crate_specifier.stderr +++ b/tests/max_encoded_len_ui/missing_crate_specifier.stderr @@ -10,16 +10,16 @@ error[E0277]: the trait bound `Example: Encode` is not satisfied 5 | struct Example; | ^^^^^^^ the trait `WrapperTypeEncode` is not implemented for `Example`, which is required by `Example: Encode` | - = help: the following other types implement trait `Encode`: - () - (A0, B0, C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) - (B0, C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) - (C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) - (D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) - (E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) - (F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) - (G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) - and $N others + = help: the following other types implement trait `WrapperTypeEncode`: + &T + &mut T + Arc + Box + Cow<'a, T> + Rc + String + Vec + parity_scale_codec::Ref<'a, T, U> = note: required for `Example` to implement `Encode` note: required by a bound in `MaxEncodedLen` --> src/max_encoded_len.rs @@ -33,16 +33,16 @@ error[E0277]: the trait bound `Example: Encode` is not satisfied 8 | let _ = Example::max_encoded_len(); | ^^^^^^^ the trait `WrapperTypeEncode` is not implemented for `Example`, which is required by `Example: Encode` | - = help: the following other types implement trait `Encode`: - () - (A0, B0, C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) - (B0, C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) - (C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) - (D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) - (E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) - (F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) - (G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) - and $N others + = help: the following other types implement trait `WrapperTypeEncode`: + &T + &mut T + Arc + Box + Cow<'a, T> + Rc + String + Vec + parity_scale_codec::Ref<'a, T, U> = note: required for `Example` to implement `Encode` note: required by a bound in `max_encoded_len` --> src/max_encoded_len.rs diff --git a/tests/max_encoded_len_ui/not_encode.stderr b/tests/max_encoded_len_ui/not_encode.stderr index cd0695a3..19b175bb 100644 --- a/tests/max_encoded_len_ui/not_encode.stderr +++ b/tests/max_encoded_len_ui/not_encode.stderr @@ -4,16 +4,16 @@ error[E0277]: the trait bound `NotEncode: Encode` is not satisfied 4 | struct NotEncode; | ^^^^^^^^^ the trait `WrapperTypeEncode` is not implemented for `NotEncode`, which is required by `NotEncode: Encode` | - = help: the following other types implement trait `Encode`: - () - (A0, B0, C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) - (B0, C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) - (C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) - (D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) - (E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) - (F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) - (G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) - and $N others + = help: the following other types implement trait `WrapperTypeEncode`: + &T + &mut T + Arc + Box + Cow<'a, T> + Rc + String + Vec + parity_scale_codec::Ref<'a, T, U> = note: required for `NotEncode` to implement `Encode` note: required by a bound in `MaxEncodedLen` --> src/max_encoded_len.rs